mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 19:30:29 +00:00
vcscanf: remove strtod call repetition
Place it after the GotFloatingPointNumber label where it belongs.
This commit is contained in:
parent
64d2b12639
commit
8f12a061ad
1 changed files with 1 additions and 5 deletions
|
@ -344,7 +344,6 @@ int __vcscanf(int callback(void *), //
|
|||
hexadecimal = true;
|
||||
goto BufferFloatingPointNumber;
|
||||
} else if (c == -1) {
|
||||
fp = strtod((char *) buf, NULL);
|
||||
goto GotFloatingPointNumber;
|
||||
} else {
|
||||
goto BufferFloatingPointNumber;
|
||||
|
@ -367,10 +366,8 @@ int __vcscanf(int callback(void *), //
|
|||
if (c == ')') {
|
||||
c = BUFFER;
|
||||
}
|
||||
fp = strtod((char *) buf, NULL);
|
||||
goto GotFloatingPointNumber;
|
||||
} else {
|
||||
fp = strtod((char *) buf, NULL);
|
||||
goto GotFloatingPointNumber;
|
||||
}
|
||||
} else {
|
||||
|
@ -411,7 +408,6 @@ int __vcscanf(int callback(void *), //
|
|||
if (c != -1 && unget) {
|
||||
unget(c, arg);
|
||||
}
|
||||
fp = strtod((char *) buf, NULL);
|
||||
goto GotFloatingPointNumber;
|
||||
}
|
||||
} else {
|
||||
|
@ -469,8 +465,8 @@ int __vcscanf(int callback(void *), //
|
|||
}
|
||||
break;
|
||||
} while ((c = BUFFER) != -1);
|
||||
fp = strtod((char *)buf, NULL);
|
||||
GotFloatingPointNumber:
|
||||
fp = strtod((char *)buf, NULL);
|
||||
if (!discard) {
|
||||
++items;
|
||||
void *out = va_arg(va, void *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue