forked from github/server
parsing needs to return a static buffer if it has no argument
This commit is contained in:
parent
6ffec7017c
commit
43351e03cd
|
@ -201,16 +201,15 @@ char *parse_token(const char **str, char *lbuf, size_t buflen)
|
||||||
return lbuf;
|
return lbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char pbuf[MAXTOKENSIZE]; /* STATIC_RESULT: used for return, not across calls */
|
||||||
const char *parse_token_depr(const char **str)
|
const char *parse_token_depr(const char **str)
|
||||||
{
|
{
|
||||||
static char lbuf[MAXTOKENSIZE]; /* STATIC_RESULT: used for return, not across calls */
|
return parse_token(str, pbuf, MAXTOKENSIZE);
|
||||||
return parse_token(str, lbuf, MAXTOKENSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getstrtoken(void)
|
const char *getstrtoken(void)
|
||||||
{
|
{
|
||||||
char lbuf[MAXTOKENSIZE];
|
return parse_token((const char **)&states->current_token, pbuf, MAXTOKENSIZE);
|
||||||
return parse_token((const char **)&states->current_token, lbuf, MAXTOKENSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *gettoken(char *lbuf, size_t bufsize)
|
const char *gettoken(char *lbuf, size_t bufsize)
|
||||||
|
|
Loading…
Reference in New Issue