summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-08-13 11:18:09 -0600
committerJens Axboe <axboe@kernel.dk>2018-08-13 11:18:09 -0600
commit922e390f69c8169a215187ea8ef5aca0deac11b8 (patch)
tree6b3256f7b484ace54dd5527f6c69563813d4091d
parent38e7d820bb9e7be375a0b4c6a4bf54ceed630411 (diff)
asprintf: fix indentation
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--oslib/asprintf.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/oslib/asprintf.c b/oslib/asprintf.c
index 969479f..ff503c5 100644
--- a/oslib/asprintf.c
+++ b/oslib/asprintf.c
@@ -6,38 +6,38 @@
#ifndef CONFIG_HAVE_VASPRINTF
int vasprintf(char **strp, const char *fmt, va_list ap)
{
- va_list ap_copy;
- char *str;
- int len;
+ va_list ap_copy;
+ char *str;
+ int len;
#ifdef va_copy
- va_copy(ap_copy, ap);
+ va_copy(ap_copy, ap);
#else
- __va_copy(ap_copy, ap);
+ __va_copy(ap_copy, ap);
#endif
- len = vsnprintf(NULL, 0, fmt, ap_copy);
- va_end(ap_copy);
+ len = vsnprintf(NULL, 0, fmt, ap_copy);
+ va_end(ap_copy);
- if (len < 0)
- return len;
+ if (len < 0)
+ return len;
- len++;
- str = malloc(len);
- *strp = str;
- return str ? vsnprintf(str, len, fmt, ap) : -1;
+ len++;
+ str = malloc(len);
+ *strp = str;
+ return str ? vsnprintf(str, len, fmt, ap) : -1;
}
#endif
#ifndef CONFIG_HAVE_ASPRINTF
int asprintf(char **strp, const char *fmt, ...)
{
- va_list arg;
- int done;
+ va_list arg;
+ int done;
- va_start(arg, fmt);
- done = vasprintf(strp, fmt, arg);
- va_end(arg);
+ va_start(arg, fmt);
+ done = vasprintf(strp, fmt, arg);
+ va_end(arg);
- return done;
+ return done;
}
#endif