mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 19:30:29 +00:00
vcscanf: move buffer variables to top of function
This buffer is currently used only when decoding strings. Place it at the top level so other code can also use it. Ensure it is initialized to NULL.
This commit is contained in:
parent
6ca5ab4680
commit
64c883a320
1 changed files with 2 additions and 2 deletions
|
@ -60,6 +60,8 @@ int __vcscanf(int callback(void *), //
|
|||
struct FreeMe *next;
|
||||
void *ptr;
|
||||
} *freeme = NULL;
|
||||
void *buf = NULL;
|
||||
size_t bufsize;
|
||||
const unsigned char *p = (const unsigned char *)fmt;
|
||||
int *n_ptr;
|
||||
int items = 0;
|
||||
|
@ -84,8 +86,6 @@ int __vcscanf(int callback(void *), //
|
|||
break;
|
||||
case '%': {
|
||||
uint128_t number;
|
||||
void *buf;
|
||||
size_t bufsize;
|
||||
unsigned width = 0;
|
||||
unsigned char bits = 32;
|
||||
unsigned char charbytes = sizeof(char);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue