libopkg: flag package with SF_NEED_DETAIL in pkg_init_from_file()
[oweals/opkg-lede.git] / libopkg / sprintf_alloc.c
index aef8e066c3a102f5411e59ec5397beca9424f154..82a847160edd9a6f52097d11c8705df73b2e82d9 100644 (file)
@@ -18,8 +18,7 @@
 #include "sprintf_alloc.h"
 #include "libbb/libbb.h"
 
-void
-sprintf_alloc(char **str, const char *fmt, ...)
+void sprintf_alloc(char **str, const char *fmt, ...)
 {
        va_list ap;
        int n;
@@ -29,13 +28,12 @@ sprintf_alloc(char **str, const char *fmt, ...)
 
        for (;;) {
                va_start(ap, fmt);
-               n = vsnprintf (*str, size, fmt, ap);
+               n = vsnprintf(*str, size, fmt, ap);
                va_end(ap);
 
                if (n < 0) {
                        fprintf(stderr, "%s: encountered an output or encoding"
-                                       " error during vsnprintf.\n",
-                                       __FUNCTION__);
+                               " error during vsnprintf.\n", __FUNCTION__);
                        exit(EXIT_FAILURE);
                }
 
@@ -43,7 +41,7 @@ sprintf_alloc(char **str, const char *fmt, ...)
                        break;
 
                /* Truncated, try again with more space. */
-               size = n+1;
+               size = n + 1;
                *str = xrealloc(*str, size);
        }
 }