Mercurial > mplayer.hg
comparison stream/stream.c @ 36660:7fd255e0db1b
stream.c: remove pointless NULL check.
Since it currently is a fixed-size array it can never be NULL.
But even if this was changed, this check has no real value:
it should still only be possible in case of an obvious code bug
during development and the crash it would cause would be easy enough
to debug.
author | reimar |
---|---|
date | Sun, 26 Jan 2014 18:59:15 +0000 |
parents | b50212f27ffa |
children | 43a8e37a3dcf |
comparison
equal
deleted
inserted
replaced
36659:f41b65ac7e81 | 36660:7fd255e0db1b |
---|---|
224 stream_t* s; | 224 stream_t* s; |
225 char *redirected_url = NULL; | 225 char *redirected_url = NULL; |
226 | 226 |
227 for(i = 0 ; auto_open_streams[i] ; i++) { | 227 for(i = 0 ; auto_open_streams[i] ; i++) { |
228 sinfo = auto_open_streams[i]; | 228 sinfo = auto_open_streams[i]; |
229 if(!sinfo->protocols) { | |
230 mp_msg(MSGT_OPEN,MSGL_WARN, MSGTR_StreamProtocolNULL, sinfo->name); | |
231 continue; | |
232 } | |
233 for(j = 0 ; sinfo->protocols[j] ; j++) { | 229 for(j = 0 ; sinfo->protocols[j] ; j++) { |
234 l = strlen(sinfo->protocols[j]); | 230 l = strlen(sinfo->protocols[j]); |
235 // l == 0 => Don't do protocol matching (ie network and filenames) | 231 // l == 0 => Don't do protocol matching (ie network and filenames) |
236 if((l == 0 && !strstr(filename, "://")) || | 232 if((l == 0 && !strstr(filename, "://")) || |
237 ((strncasecmp(sinfo->protocols[j],filename,l) == 0) && | 233 ((strncasecmp(sinfo->protocols[j],filename,l) == 0) && |