[FFmpeg-devel] [PATCH] Remove comparison of unsigned variable with zero
Luca Abeni
lucabe72
Fri May 9 12:06:12 CEST 2008
Hi,
Carl Eugen Hoyos wrote:
> Hi!
>
> dest_addr_len in udp.c is defined as size_t which is unsigned (if I
> googled that correctly). Attached patch removes a comparison of
> dest_addr_len with zero (fixes a warning when compiling with icc).
I do not like this patch, because it removes an error check. I think we
have 3 possibilities here:
1) change dest_addr_len to int
2) use a temporary (int) variable to store the result of udp_set_url()
3) modify udp_set_url to return 0 on errror, and change the error check
from "< 0" to "== 0".
I do not know which one of the 3 solutions is the best (I suspect it is
just a matter of personal taste).
I am currently travelling, and I have no access to svn... I'll generate
some patches implementing the above ideas on saturday or on monday, and
I'll send them for review.
Luca
More information about the ffmpeg-devel
mailing list