aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/vfscanf.c5
-rw-r--r--lib/libc/stdio/vfwscanf.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index a678710e1ecb..89e9e843969f 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -318,10 +318,9 @@ parseint_fsm(int c, enum parseint_state *state, int *base)
case '0':
if (*state == begin || *state == havesign) {
*state = havezero;
- } else {
- *state = any;
+ return 1;
}
- return 1;
+ /* FALL THROUGH */
case '1':
case '2':
case '3':
diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c
index 57206a8407d5..7ca64eb37811 100644
--- a/lib/libc/stdio/vfwscanf.c
+++ b/lib/libc/stdio/vfwscanf.c
@@ -298,10 +298,9 @@ parseint_fsm(wchar_t c, enum parseint_state *state, int *base)
case '0':
if (*state == begin || *state == havesign) {
*state = havezero;
- } else {
- *state = any;
+ return 1;
}
- return 1;
+ /* FALL THROUGH */
case '1':
case '2':
case '3':