From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFBAt-0004pY-TV for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:03:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFBAs-0004nZ-Tr for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:03:51 -0400 Received: from [199.232.76.173] (port=58766 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFBAs-0004nI-NT for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:03:50 -0400 Received: from mx20.gnu.org ([199.232.41.8]:23176) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KFBAs-0007De-Ai for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:03:50 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KF815-0002h8-1r for qemu-devel@nongnu.org; Sat, 05 Jul 2008 09:41:31 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KF80c-0005xq-Uk for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:41:03 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KF80c-0005xm-LH for qemu-devel@nongnu.org; Sat, 05 Jul 2008 13:41:02 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Sat, 05 Jul 2008 13:41:02 +0000 Subject: [Qemu-devel] [4848] Remove >= asserts on unsigned inputs Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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);