From: tb Date: Fri, 15 Dec 2023 01:47:50 +0000 (+0000) Subject: Coverity rightly points out that an unsigned int is always >= 0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a82d74d570568048fde0626303a5c574a5596a99;p=openbsd Coverity rightly points out that an unsigned int is always >= 0 --- diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c index a889e771e93..f97a5b76d9d 100644 --- a/lib/libcrypto/objects/obj_dat.c +++ b/lib/libcrypto/objects/obj_dat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_dat.c,v 1.80 2023/12/14 18:32:49 tb Exp $ */ +/* $OpenBSD: obj_dat.c,v 1.81 2023/12/15 01:47:50 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -339,7 +339,7 @@ obj_objs_cmp(const void *aobj, const void *b) { const unsigned int *nid = b; - OPENSSL_assert(*nid >= 0 && *nid < NUM_NID); + OPENSSL_assert(*nid < NUM_NID); return OBJ_cmp(aobj, &nid_objs[*nid]); } @@ -381,7 +381,7 @@ ln_objs_cmp(const void *ln, const void *b) { const unsigned int *nid = b; - OPENSSL_assert(*nid >= 0 && *nid < NUM_NID); + OPENSSL_assert(*nid < NUM_NID); return strcmp(ln, nid_objs[*nid].ln); } @@ -420,7 +420,7 @@ sn_objs_cmp(const void *sn, const void *b) { const unsigned int *nid = b; - OPENSSL_assert(*nid >= 0 && *nid < NUM_NID); + OPENSSL_assert(*nid < NUM_NID); return strcmp(sn, nid_objs[*nid].sn); }