Remove >= asserts on unsigned inputs

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4848 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
malc 2008-07-05 13:41:02 +00:00
parent db8baf145d
commit 295abf3616
1 changed files with 0 additions and 3 deletions

View File

@ -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);