comparison rtsp.c @ 4776:894e353aaeca libavformat

Fix silly bug in hex_to_data() where it compares a string pointer for whether 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.
author rbultje
date Sat, 21 Mar 2009 20:58:41 +0000
parents 57e9cd4ff7b5
children 31678a2764ee
comparison
equal deleted inserted replaced
4775:57e9cd4ff7b5 4776:894e353aaeca
172 172
173 len = 0; 173 len = 0;
174 v = 1; 174 v = 1;
175 for(;;) { 175 for(;;) {
176 skip_spaces(&p); 176 skip_spaces(&p);
177 if (p == '\0') 177 if (*p == '\0')
178 break; 178 break;
179 c = toupper((unsigned char)*p++); 179 c = toupper((unsigned char)*p++);
180 if (c >= '0' && c <= '9') 180 if (c >= '0' && c <= '9')
181 c = c - '0'; 181 c = c - '0';
182 else if (c >= 'A' && c <= 'F') 182 else if (c >= 'A' && c <= 'F')