From 295abf3616506e6e121d86e2d1a4b4ef8c9dd632 Mon Sep 17 00:00:00 2001 From: malc Date: Sat, 5 Jul 2008 13:41:02 +0000 Subject: [PATCH] Remove >= asserts on unsigned inputs git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4848 c046a42c-6fe2-441c-8c8c-71466251a162 --- block-vvfat.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block-vvfat.c b/block-vvfat.c index 08d426bbd5..9394fbd69c 100644 --- a/block-vvfat.c +++ b/block-vvfat.c @@ -93,7 +93,6 @@ static inline void array_free(array_t* array) /* does not automatically grow */ static inline void* array_get(array_t* array,unsigned int index) { - assert(index >= 0); assert(index < array->next); return array->pointer + index * array->item_size; } @@ -195,7 +194,6 @@ static int array_remove(array_t* array,int index) static int array_index(array_t* array, void* pointer) { size_t offset = (char*)pointer - array->pointer; - assert(offset >= 0); assert((offset % array->item_size) == 0); assert(offset/array->item_size < array->next); return offset/array->item_size; @@ -2238,7 +2236,6 @@ static int commit_one_file(BDRVVVFATState* s, assert((size - offset == 0 && fat_eof(s, c)) || (size > offset && c >=2 && !fat_eof(s, c))); - assert(size >= 0); ret = vvfat_read(s->bs, cluster2sector(s, c), (uint8_t*)cluster, (rest_size + 0x1ff) / 0x200);