OSDN Git Service

udp: Fix a compilation warning
authorMartin Storsjö <martin@martin.st>
Fri, 17 Jun 2011 07:08:23 +0000 (10:08 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 30 Jun 2011 09:04:46 +0000 (12:04 +0300)
This fixes this compilation warning, by making endptr a non-const
pointer, as required by strtol:
In function ‘udp_open’:
warning: passing argument 2 of ‘strtol’ from incompatible pointer type

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/udp.c

index 724ff01..bd95a81 100644 (file)
@@ -328,7 +328,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
     p = strchr(uri, '?');
     if (p) {
         if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) {
-            const char *endptr=NULL;
+            char *endptr = NULL;
             s->reuse_socket = strtol(buf, &endptr, 10);
             /* assume if no digits were found it is a request to enable it */
             if (buf == endptr)