Commit 295abf3616506e6e121d86e2d1a4b4ef8c9dd632
1 parent
db8baf14
Remove >= asserts on unsigned inputs
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4848 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
0 additions
and
3 deletions
block-vvfat.c
... | ... | @@ -93,7 +93,6 @@ static inline void array_free(array_t* array) |
93 | 93 | |
94 | 94 | /* does not automatically grow */ |
95 | 95 | static inline void* array_get(array_t* array,unsigned int index) { |
96 | - assert(index >= 0); | |
97 | 96 | assert(index < array->next); |
98 | 97 | return array->pointer + index * array->item_size; |
99 | 98 | } |
... | ... | @@ -195,7 +194,6 @@ static int array_remove(array_t* array,int index) |
195 | 194 | static int array_index(array_t* array, void* pointer) |
196 | 195 | { |
197 | 196 | size_t offset = (char*)pointer - array->pointer; |
198 | - assert(offset >= 0); | |
199 | 197 | assert((offset % array->item_size) == 0); |
200 | 198 | assert(offset/array->item_size < array->next); |
201 | 199 | return offset/array->item_size; |
... | ... | @@ -2238,7 +2236,6 @@ static int commit_one_file(BDRVVVFATState* s, |
2238 | 2236 | |
2239 | 2237 | assert((size - offset == 0 && fat_eof(s, c)) || |
2240 | 2238 | (size > offset && c >=2 && !fat_eof(s, c))); |
2241 | - assert(size >= 0); | |
2242 | 2239 | |
2243 | 2240 | ret = vvfat_read(s->bs, cluster2sector(s, c), |
2244 | 2241 | (uint8_t*)cluster, (rest_size + 0x1ff) / 0x200); | ... | ... |