Module Name: src
Committed By: lukem
Date: Sat Apr 18 08:17:23 UTC 2009
Modified Files:
src/usr.sbin/quot: quot.c
Log Message:
Fix -Wcast-qual issue
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/quot/quot.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/quot/quot.c
diff -u src/usr.sbin/quot/quot.c:1.27 src/usr.sbin/quot/quot.c:1.28
--- src/usr.sbin/quot/quot.c:1.27 Tue Jul 17 22:00:46 2007
+++ src/usr.sbin/quot/quot.c Sat Apr 18 08:17:23 2009
@@ -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 <sys/cdefs.h>
#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 <sys/param.h>
@@ -296,7 +296,7 @@
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 @@
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