qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4848] Remove >= asserts on unsigned inputs
@ 2008-07-05 13:41 malc
  0 siblings, 0 replies; only message in thread
From: malc @ 2008-07-05 13:41 UTC (permalink / raw)
  To: qemu-devel

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
===================================================================
--- trunk/block-vvfat.c	2008-07-05 13:40:58 UTC (rev 4847)
+++ trunk/block-vvfat.c	2008-07-05 13:41:02 UTC (rev 4848)
@@ -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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-05 17:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-05 13:41 [Qemu-devel] [4848] Remove >= asserts on unsigned inputs malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).