OSDN Git Service

Fix silly bug in hex_to_data() where it compares a string pointer for whether
authorRonald S. Bultje <rsbultje@gmail.com>
Sat, 21 Mar 2009 20:58:41 +0000 (20:58 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Sat, 21 Mar 2009 20:58:41 +0000 (20:58 +0000)
it is '\0' rather than its content (char *p; if (p == '\0') instead of if
(*p == '\0')). See summary in "[PATCH] rtsp.c small cleanups" thread on
mailinglist.

Originally committed as revision 18125 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtsp.c

index 406998d..4737814 100644 (file)
@@ -174,7 +174,7 @@ static int hex_to_data(uint8_t *data, const char *p)
     v = 1;
     for(;;) {
         skip_spaces(&p);
-        if (p == '\0')
+        if (*p == '\0')
             break;
         c = toupper((unsigned char)*p++);
         if (c >= '0' && c <= '9')