Commit 29a28066 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ard Biesheuvel

efi/printf: Drop %n format and L qualifier

%n is unused and deprecated.

The L qualifer is parsed but not actually implemented.
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200518190716.751506-7-nivedita@alum.mit.eduSigned-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent bbf8e8b0
...@@ -127,7 +127,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -127,7 +127,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
int field_width; /* width of output field */ int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max int precision; /* min. # of digits for integers; max
number of chars for from string */ number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */ int qualifier; /* 'h' or 'l' for integer fields */
for (str = buf; *fmt; ++fmt) { for (str = buf; *fmt; ++fmt) {
if (*fmt != '%') { if (*fmt != '%') {
...@@ -188,7 +188,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -188,7 +188,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
/* get the conversion qualifier */ /* get the conversion qualifier */
qualifier = -1; qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') { if (*fmt == 'h' || *fmt == 'l') {
qualifier = *fmt; qualifier = *fmt;
++fmt; ++fmt;
} }
...@@ -229,16 +229,6 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -229,16 +229,6 @@ int vsprintf(char *buf, const char *fmt, va_list args)
field_width, precision, flags); field_width, precision, flags);
continue; continue;
case 'n':
if (qualifier == 'l') {
long *ip = va_arg(args, long *);
*ip = (str - buf);
} else {
int *ip = va_arg(args, int *);
*ip = (str - buf);
}
continue;
case '%': case '%':
*str++ = '%'; *str++ = '%';
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment