]> git.sesse.net Git - ffmpeg/commitdiff
lavu/parseutils: make small_strptime() return a (non const) char *
authorStefano Sabatini <stefasab@gmail.com>
Wed, 5 Sep 2012 21:28:52 +0000 (23:28 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 5 Sep 2012 22:40:01 +0000 (00:40 +0200)
This is consistent with the standard definition of strptime().

libavutil/parseutils.c

index 588441136dafd9879ee2e64cb6d1a366482c3dd4..5e2644cb4f9b17851a08a0ae7a4c994b298ed5e8 100644 (file)
@@ -448,14 +448,14 @@ static int date_get_num(const char **pp,
  * function call, or NULL in case the function fails to match all of
  * the fmt string and therefore an error occurred
  */
-static const char *small_strptime(const char *p, const char *fmt, struct tm *dt)
+static char *small_strptime(const char *p, const char *fmt, struct tm *dt)
 {
     int c, val;
 
     for(;;) {
         c = *fmt++;
         if (c == '\0') {
-            return p;
+            return (char *)p;
         } else if (c == '%') {
             c = *fmt++;
             switch(c) {