diff --git a/libc/stdio/lib_sscanf.c b/libc/stdio/lib_sscanf.c index 858cf8db2d0..fed7d71f347 100644 --- a/libc/stdio/lib_sscanf.c +++ b/libc/stdio/lib_sscanf.c @@ -90,6 +90,7 @@ static const char spaces[] = " \t\n\r\f\v"; static int findwidth(FAR const char *buf, FAR const char *fmt) { +#if 0 /* Behavior no longer supported */ FAR const char *next = fmt + 1; /* No... is there a space after the format? Or does the format string end @@ -114,7 +115,7 @@ static int findwidth(FAR const char *buf, FAR const char *fmt) */ FAR const char *ptr = strchr(buf, *next); - if (ptr) + if (ptr != NULL) { return (int)(ptr - buf); } @@ -130,6 +131,9 @@ static int findwidth(FAR const char *buf, FAR const char *fmt) * determining the width of the data if there is no fieldwidth, no space * separating the input, and no usable delimiter character. */ +#endif + + /* Use the input up until the first white space is encountered. */ return strcspn(buf, spaces); }