On Thu, 2011-12-15 at 20:29 -0800, Ronald S. Bultje wrote:
> On Thu, Dec 15, 2011 at 8:26 PM, Uoti Urpala <[email protected]>
> wrote:

>         If the caller doesn't validate it and it can be INT_MAX then
>         it can
>         likely also be negative. So if you want to handle that case
>         then the test should probably cast the value to an unsigned
>         type.
> 
> The pointers are unsigned, doesn't C dictate that a comparison between
> signed and unsigned will be unsigned?

The data type the pointers *point to* may be unsigned, but that's
irrelevant here. The value actually being compared with is the result of
subtracting two pointers, which has type ptrdiff_t (a signed integer
type).


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to