ffserver: drop custom skip_spaces() impl
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
This commit is contained in:
parent
4c8be331bc
commit
2638af2fc5
13
ffserver.c
13
ffserver.c
@ -1258,24 +1258,13 @@ static int modify_current_stream(HTTPContext *c, char *rates)
|
|||||||
return action_required;
|
return action_required;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: factorize in utils.c ? */
|
|
||||||
/* XXX: take care with different space meaning */
|
|
||||||
static void skip_spaces(const char **pp)
|
|
||||||
{
|
|
||||||
const char *p;
|
|
||||||
p = *pp;
|
|
||||||
while (*p == ' ' || *p == '\t')
|
|
||||||
p++;
|
|
||||||
*pp = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void get_word(char *buf, int buf_size, const char **pp)
|
static void get_word(char *buf, int buf_size, const char **pp)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
char *q;
|
char *q;
|
||||||
|
|
||||||
p = *pp;
|
p = *pp;
|
||||||
skip_spaces(&p);
|
p += strspn(p, SPACE_CHARS);
|
||||||
q = buf;
|
q = buf;
|
||||||
while (!av_isspace(*p) && *p != '\0') {
|
while (!av_isspace(*p) && *p != '\0') {
|
||||||
if ((q - buf) < buf_size - 1)
|
if ((q - buf) < buf_size - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user