diff options
-rw-r--r-- | lib/vsprintf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 708e505ce81f..be3001f912e4 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -398,7 +398,7 @@ static noinline char* put_dec(char *buf, unsigned long long num) | |||
398 | 398 | ||
399 | enum format_type { | 399 | enum format_type { |
400 | FORMAT_TYPE_NONE, /* Just a string part */ | 400 | FORMAT_TYPE_NONE, /* Just a string part */ |
401 | FORMAT_TYPE_WITDH, | 401 | FORMAT_TYPE_WIDTH, |
402 | FORMAT_TYPE_PRECISION, | 402 | FORMAT_TYPE_PRECISION, |
403 | FORMAT_TYPE_CHAR, | 403 | FORMAT_TYPE_CHAR, |
404 | FORMAT_TYPE_STR, | 404 | FORMAT_TYPE_STR, |
@@ -770,7 +770,7 @@ static int format_decode(const char *fmt, struct printf_spec *spec) | |||
770 | const char *start = fmt; | 770 | const char *start = fmt; |
771 | 771 | ||
772 | /* we finished early by reading the field width */ | 772 | /* we finished early by reading the field width */ |
773 | if (spec->type == FORMAT_TYPE_WITDH) { | 773 | if (spec->type == FORMAT_TYPE_WIDTH) { |
774 | if (spec->field_width < 0) { | 774 | if (spec->field_width < 0) { |
775 | spec->field_width = -spec->field_width; | 775 | spec->field_width = -spec->field_width; |
776 | spec->flags |= LEFT; | 776 | spec->flags |= LEFT; |
@@ -828,7 +828,7 @@ static int format_decode(const char *fmt, struct printf_spec *spec) | |||
828 | spec->field_width = skip_atoi(&fmt); | 828 | spec->field_width = skip_atoi(&fmt); |
829 | else if (*fmt == '*') { | 829 | else if (*fmt == '*') { |
830 | /* it's the next argument */ | 830 | /* it's the next argument */ |
831 | spec->type = FORMAT_TYPE_WITDH; | 831 | spec->type = FORMAT_TYPE_WIDTH; |
832 | return ++fmt - start; | 832 | return ++fmt - start; |
833 | } | 833 | } |
834 | 834 | ||
@@ -1002,7 +1002,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
1002 | break; | 1002 | break; |
1003 | } | 1003 | } |
1004 | 1004 | ||
1005 | case FORMAT_TYPE_WITDH: | 1005 | case FORMAT_TYPE_WIDTH: |
1006 | spec.field_width = va_arg(args, int); | 1006 | spec.field_width = va_arg(args, int); |
1007 | break; | 1007 | break; |
1008 | 1008 | ||
@@ -1306,7 +1306,7 @@ do { \ | |||
1306 | case FORMAT_TYPE_NONE: | 1306 | case FORMAT_TYPE_NONE: |
1307 | break; | 1307 | break; |
1308 | 1308 | ||
1309 | case FORMAT_TYPE_WITDH: | 1309 | case FORMAT_TYPE_WIDTH: |
1310 | case FORMAT_TYPE_PRECISION: | 1310 | case FORMAT_TYPE_PRECISION: |
1311 | save_arg(int); | 1311 | save_arg(int); |
1312 | break; | 1312 | break; |
@@ -1472,7 +1472,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf) | |||
1472 | break; | 1472 | break; |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | case FORMAT_TYPE_WITDH: | 1475 | case FORMAT_TYPE_WIDTH: |
1476 | spec.field_width = get_arg(int); | 1476 | spec.field_width = get_arg(int); |
1477 | break; | 1477 | break; |
1478 | 1478 | ||