Fix some type mismatch issues (gid_t and uid_t are unsigned); pointed out

by chs@.
This commit is contained in:
jmmv 2005-09-25 18:55:51 +00:00
parent ff2bab1c59
commit ff29f0196f
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount_tmpfs.c,v 1.6 2005/09/25 08:15:30 jmmv Exp $ */
/* $NetBSD: mount_tmpfs.c,v 1.7 2005/09/25 18:55:51 jmmv Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mount_tmpfs.c,v 1.6 2005/09/25 08:15:30 jmmv Exp $");
__RCSID("$NetBSD: mount_tmpfs.c,v 1.7 2005/09/25 18:55:51 jmmv Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -229,10 +229,10 @@ dehumanize_group(const char *str, gid_t *gid)
error = 1;
} else {
char *ep;
long tmp;
unsigned long tmp;
errno = 0;
tmp = strtol(str, &ep, 10);
tmp = strtoul(str, &ep, 0);
if (str[0] == '\0' || *ep != '\0')
error = 0; /* Not a number. */
else if (errno == ERANGE &&
@ -359,10 +359,10 @@ dehumanize_user(const char *str, uid_t *uid)
error = 1;
} else {
char *ep;
long tmp;
unsigned long tmp;
errno = 0;
tmp = strtol(str, &ep, 10);
tmp = strtoul(str, &ep, 0);
if (str[0] == '\0' || *ep != '\0')
error = 0; /* Not a number. */
else if (errno == ERANGE &&