Browse Source

lavu/parseutils: make small_strptime() return a (non const) char *

This is consistent with the standard definition of strptime().
tags/n1.0
Stefano Sabatini 13 years ago
parent
commit
79dcd58d83
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavutil/parseutils.c

+ 2
- 2
libavutil/parseutils.c View 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 * function call, or NULL in case the function fails to match all of
* the fmt string and therefore an error occurred * 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; int c, val;


for(;;) { for(;;) {
c = *fmt++; c = *fmt++;
if (c == '\0') { if (c == '\0') {
return p;
return (char *)p;
} else if (c == '%') { } else if (c == '%') {
c = *fmt++; c = *fmt++;
switch(c) { switch(c) {


Loading…
Cancel
Save