aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
-rw-r--r--lib/libc/stdio/vsnprintf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
index 12f3043..ad91132 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -234,13 +234,12 @@ print_format(char **buffer, size_t bufsize, const char *format, void *var)
form++;
}
-
return (long int) (*buffer - start);
}
/*
- * The vsnprintf function prints a formated strings into a buffer.
+ * The vsnprintf function prints a formatted string into a buffer.
* BUG: buffer size checking does not fully work yet
*/
int
@@ -266,7 +265,7 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg)
if(*ptr == '%') {
char formstr[20];
int i=0;
-
+
do {
formstr[i] = *ptr;
ptr++;
@@ -292,7 +291,7 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg)
ptr++;
}
}
-
+
*buffer = '\0';
return (buffer - bstart);