Module Name: src Committed By: lukem Date: Mon Apr 6 12:47:20 UTC 2009
Modified Files: src/sbin/raidctl: rf_configure.c Log Message: fix sign-compare issue To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sbin/raidctl/rf_configure.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/raidctl/rf_configure.c diff -u src/sbin/raidctl/rf_configure.c:1.23 src/sbin/raidctl/rf_configure.c:1.24 --- src/sbin/raidctl/rf_configure.c:1.23 Sun Mar 19 01:57:11 2006 +++ src/sbin/raidctl/rf_configure.c Mon Apr 6 12:47:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_configure.c,v 1.23 2006/03/19 01:57:11 dan Exp $ */ +/* $NetBSD: rf_configure.c,v 1.24 2009/04/06 12:47:20 lukem Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. @@ -49,7 +49,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rf_configure.c,v 1.23 2006/03/19 01:57:11 dan Exp $"); +__RCSID("$NetBSD: rf_configure.c,v 1.24 2009/04/06 12:47:20 lukem Exp $"); #endif @@ -399,7 +399,7 @@ while (fscanf(fp, "%d", &val) == 1) *p++ = (char) val; fclose(fp); - if (p - cfgBuf != cfgPtr->layoutSpecificSize) { + if ((unsigned int)(p - cfgBuf) != cfgPtr->layoutSpecificSize) { RF_ERRORMSG2("Size mismatch creating layout specific data: is %d sb %d bytes\n", (int) (p - cfgBuf), (int) (6 * sizeof(int) + b * k)); return (EINVAL); }