aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-06-26 09:53:37 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-06-26 09:53:37 +0000
commitce365ee3189f362de67430336609c4bd3c5f5dd7 (patch)
tree263e0421233a54a3048847511c36a4b4860cd833 /sys
parent4dcedbebe2afcb3312f328f7d1e62c326d6dccb7 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_bus.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 769044407a06..e6c6bcfeaa79 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1285,7 +1285,7 @@ static int
resource_find_hard(const char *cp, const char *name, int unit,
const char *resname, struct config_resource **result)
{
- static char match[100];
+ char match[256];
int matchlen;
char *op;
long val;
@@ -1307,7 +1307,7 @@ resource_find_hard(const char *cp, const char *name, int unit,
cp += matchlen; /* skip over name and '=' */
else
return ENOENT;
- val = strtol(cp, &op, 0);
+ val = strtoul(cp, &op, 0);
if (*cp != '\0' && *op == '\0') {
(*result)->type = RES_INT;
(*result)->u.intval = val;
@@ -1562,7 +1562,7 @@ hint_load(char *cp)
int unit;
char resname[255];
- for (ep = cp; (*ep != '=') && (*ep != 0); ep++)
+ for (ep = cp; *ep != '=' && *ep != '\0'; ep++)
;
len = ep - cp;
if (*ep == '=')
@@ -1586,7 +1586,7 @@ hint_load(char *cp)
walker++;
if (*walker != '.')
return;
- unit = strtol(op, &walker, 0);
+ unit = strtoul(op, &walker, 0);
if (*walker != '.')
return;
walker++;
@@ -1604,7 +1604,7 @@ hint_load(char *cp)
return;
if (bootverbose)
printf("Setting %s %d %s to ", name, unit, resname);
- val = strtol(ep, &op, 0);
+ val = strtoul(ep, &op, 0);
if (*ep != '\0' && *op == '\0') {
resource_set_int(name, unit, resname, val);
if (bootverbose)
@@ -1625,19 +1625,19 @@ hints_load(void *dummy __unused)
cp = static_hints;
while (cp) {
hint_load(cp);
- while (*cp != 0)
+ while (*cp != '\0')
cp++;
cp++;
- if (*cp == 0)
+ if (*cp == '\0')
break;
}
cp = kern_envp;
while (cp) {
hint_load(cp);
- while (*cp != 0)
+ while (*cp != '\0')
cp++;
cp++;
- if (*cp == 0)
+ if (*cp == '\0')
break;
}
hints_loaded++;