]> granicus.if.org Git - apache/commitdiff
Fix 'comparison of unsigned expression < 0 is always false' warning.
authorStefan Fritsch <sf@apache.org>
Thu, 18 Nov 2010 20:23:59 +0000 (20:23 +0000)
committerStefan Fritsch <sf@apache.org>
Thu, 18 Nov 2010 20:23:59 +0000 (20:23 +0000)
(There was no actual problem as id is never set to a negative value.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036606 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_plain.c

index 0631bd38f160d0f543c5801ff7cb1586c3b56211..75e1ecfeefec0187c8f79048946001342504a55a 100644 (file)
@@ -153,7 +153,7 @@ static apr_status_t slotmem_dptr(ap_slotmem_instance_t *score, unsigned int id,
 
     if (!score)
         return APR_ENOSHMAVAIL;
-    if (id < 0 || id >= score->num)
+    if (id >= score->num)
         return APR_ENOSHMAVAIL;
 
     ptr = score->base + score->size * id;