aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdmfs
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2003-07-11 05:47:05 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2003-07-11 05:47:05 +0000
commit8a50130bbba0c21097203f701ac610019d785d33 (patch)
tree84931f6828f4b8ccd41393c4be85ba28f8e3c42a /sbin/mdmfs
parente67810e6962ed3e4f5604986cd9b0417466b80a8 (diff)
downloadsrc-8a50130bbba0c21097203f701ac610019d785d33.tar.gz
src-8a50130bbba0c21097203f701ac610019d785d33.zip
Do not compare unsigned int values with ULONG_MAX. The comparison is
always false on 64bit platforms and GCC 3.3.1 issues warning there.
Notes
Notes: svn path=/head/; revision=117430
Diffstat (limited to 'sbin/mdmfs')
-rw-r--r--sbin/mdmfs/mdmfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index e7412995c852..035f1fe77c82 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -246,7 +246,7 @@ main(int argc, char **argv)
unit = -1;
} else {
unit = strtoul(unitstr, &p, 10);
- if ((unsigned)unit == ULONG_MAX || *p != '\0')
+ if (unit == (unsigned)ULONG_MAX || *p != '\0')
errx(1, "bad device unit: %s", unitstr);
}
@@ -394,7 +394,7 @@ do_mdconfig_attach_au(const char *args, const enum md_types mdtype)
strncpy(linebuf, linep + mdnamelen, linelen);
linebuf[linelen] = '\0';
unit = strtoul(linebuf, &p, 10);
- if ((unsigned)unit == ULONG_MAX || *p != '\n')
+ if (unit == (unsigned)ULONG_MAX || *p != '\n')
errx(1, "unexpected output from mdconfig (attach)");
fclose(sfd);
@@ -513,7 +513,7 @@ extract_ugid(const char *str, struct mtpt_info *mip)
/* Derive uid. */
*uid = strtoul(user, &p, 10);
- if ((unsigned)*uid == ULONG_MAX)
+ if (*uid == (uid_t)ULONG_MAX)
usage();
if (*p != '\0') {
pw = getpwnam(user);
@@ -525,7 +525,7 @@ extract_ugid(const char *str, struct mtpt_info *mip)
/* Derive gid. */
*gid = strtoul(group, &p, 10);
- if ((unsigned)*gid == ULONG_MAX)
+ if (*gid == (gid_t)ULONG_MAX)
usage();
if (*p != '\0') {
gr = getgrnam(group);