qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4848] Remove >= asserts on unsigned inputs
Date: Sat, 05 Jul 2008 13:41:02 +0000	[thread overview]
Message-ID: <E1KF80c-0005xm-LH@cvs.savannah.gnu.org> (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
===================================================================
--- 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);

                 reply	other threads:[~2008-07-05 17:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KF80c-0005xm-LH@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).