Skip to contentSkip to conversation

[4848] Remove >= asserts on unsigned inputs

Qemu-devel malc 1 participant 1 message Jul 5, 2008

lore
Share & tools
lore

malc

author
#0 lore raw

Revision: 4848

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4848
Author:   malc
Date:     2008-07-05 13:41:02 +0000 (Sat, 05 Jul 2008)

Log Message:
-----------
Remove >= asserts on unsigned inputs

Modified Paths:
--------------
trunk/block-vvfat.c

Modified: trunk/block-vvfat.c
===================================================================

block-vvfat.c +0 -3
@@ -93,7 +93,6 @@
 
 /* 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_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 @@
 
 	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);