OSDN Git Service

ffserver: drop custom skip_spaces() impl
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sat, 13 Sep 2014 23:52:03 +0000 (20:52 -0300)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 14 Sep 2014 00:01:01 +0000 (21:01 -0300)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
ffserver.c

index 3d42f62..24e4005 100644 (file)
@@ -1258,24 +1258,13 @@ static int modify_current_stream(HTTPContext *c, char *rates)
     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)
 {
     const char *p;
     char *q;
 
     p = *pp;
-    skip_spaces(&p);
+    p += strspn(p, SPACE_CHARS);
     q = buf;
     while (!av_isspace(*p) && *p != '\0') {
         if ((q - buf) < buf_size - 1)