From 4d2da769cae08cc641cf4508d72476fc9e3efbec Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 18 Apr 2009 08:17:23 +0000 Subject: [PATCH] Fix -Wcast-qual issue --- usr.sbin/quot/quot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index e0675eb25763..78ee42947ee3 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -1,4 +1,4 @@ -/* $NetBSD: quot.c,v 1.27 2007/07/17 22:00:46 christos Exp $ */ +/* $NetBSD: quot.c,v 1.28 2009/04/18 08:17:23 lukem Exp $ */ /* * Copyright (C) 1991, 1994 Wolfgang Solfrank. @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: quot.c,v 1.27 2007/07/17 22:00:46 christos Exp $"); +__RCSID("$NetBSD: quot.c,v 1.28 2009/04/18 08:17:23 lukem Exp $"); #endif /* not lint */ #include @@ -296,7 +296,7 @@ static int cmpusers(u1, u2) const void *u1, *u2; { - return ((struct user *)u2)->space - ((struct user *)u1)->space; + return ((const struct user *)u2)->space - ((const struct user *)u1)->space; } #define sortusers(users) (qsort((users), nusers, sizeof(struct user), \ @@ -485,7 +485,7 @@ donames(fd, super, name) ungetc(c, stdin); inode1 = -1; while (scanf("%" SCNu64, &inode) == 1) { - if (inode < 0 || inode > maxino) { + if (inode > maxino) { #ifndef COMPAT warnx("invalid inode %" PRIu64, inode); #endif