From: Ted Lemon Date: Thu, 17 Jan 2002 17:04:00 +0000 (+0000) Subject: Fix a signed vs. unsigned warning. X-Git-Tag: HEAD-MERGE-V3-0-3B1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09636c655075ccd6d71fa2e8ec518963c1b6ee2b;p=thirdparty%2Fdhcp.git Fix a signed vs. unsigned warning. --- diff --git a/server/omapi.c b/server/omapi.c index b65eef17c..8a3cfb8e7 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -50,7 +50,7 @@ #ifndef lint static char copyright[] = -"$Id: omapi.c,v 1.51 2001/08/10 10:50:50 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: omapi.c,v 1.52 2002/01/17 17:04:00 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1769,11 +1769,12 @@ class_set_value (omapi_object_t *h, if (!omapi_ds_strcmp (name, "match")) { if (value -> type == omapi_datatype_data || value -> type == omapi_datatype_string) { - int minlen = (value -> u.buffer.len > 8 ? + unsigned minlen = (value -> u.buffer.len > 8 ? 8 : value -> u.buffer.len); - if (strncmp("hardware", value -> u.buffer.value, - minlen) == 0) { + if (!strncmp("hardware", + (char *)value -> u.buffer.value, minlen)) + { if (!expression_allocate(&class->submatch, MDL)) { return ISC_R_NOMEMORY;