aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-10-02 18:55:39 -0700
committerChris Robinson <[email protected]>2012-10-02 18:55:39 -0700
commitcccec40e87b302e8380c78153eeca85c99d40ece (patch)
treea99b9d52ecebc96364ac6d8f3b443c5f13b6e5a0
parentb5d9d8e0054a43a7b1681c074f67bc587ff2a387 (diff)
Fix some signed/unsigned comparisons
-rw-r--r--examples/alffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/alffmpeg.c b/examples/alffmpeg.c
index 903d85ee..98c9c15b 100644
--- a/examples/alffmpeg.c
+++ b/examples/alffmpeg.c
@@ -98,20 +98,20 @@ static int64_t MemData_seek(void *opaque, int64_t offset, int whence)
switch(whence)
{
case SEEK_SET:
- if(offset < 0 || offset > membuf->length)
+ if(offset < 0 || (uint64_t)offset > membuf->length)
return -1;
membuf->pos = offset;
break;
case SEEK_CUR:
- if((offset >= 0 && offset > membuf->length-membuf->pos) ||
- (offset < 0 && offset < -membuf->pos))
+ if((offset >= 0 && (uint64_t)offset > membuf->length-membuf->pos) ||
+ (offset < 0 && (uint64_t)(-offset) > membuf->pos))
return -1;
membuf->pos += offset;
break;
case SEEK_END:
- if(offset > 0 || offset < -membuf->length)
+ if(offset > 0 || (uint64_t)(-offset) > membuf->length)
return -1;
membuf->pos = membuf->length + offset;
break;