On Mon, Feb 22, 2021 at 20:32:14 -0800, Jose Da Silva wrote:
> - for (i = 0; string && string[i]; i++) {
> + if (string == 0)
"if (!string)" is the preferred style for pointers.
But I don't see the advantage - isn't the loop interrupted immediately
anyway if string == NULL? (Same for the other loop you changed.)
Inside the loops, the additional checks for validity of "string"
seem redundant either way, though:
while ( string && string[i] && string[i] != '\n' )
Moritz
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".