summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-03-11 11:58:16 +0000
committerbde <bde@FreeBSD.org>2004-03-11 11:58:16 +0000
commit0016f83af98e16cda533c5adf275ca76c3ac2362 (patch)
tree873c65073bc4a50436133a5678acbe7ad4856ddc /usr.sbin
parentbe31ea68bb3288af5b81dbc34787a3377ee2ef03 (diff)
downloadFreeBSD-src-0016f83af98e16cda533c5adf275ca76c3ac2362.zip
FreeBSD-src-0016f83af98e16cda533c5adf275ca76c3ac2362.tar.gz
Fixed assorted misuses of NULL in integer context.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/menus.c2
-rw-r--r--usr.sbin/sade/sade.h2
-rw-r--r--usr.sbin/sade/system.c2
-rw-r--r--usr.sbin/sade/variable.c2
-rw-r--r--usr.sbin/sysinstall/anonFTP.c2
-rw-r--r--usr.sbin/sysinstall/dhcp.c8
-rw-r--r--usr.sbin/sysinstall/menus.c2
-rw-r--r--usr.sbin/sysinstall/sysinstall.h2
-rw-r--r--usr.sbin/sysinstall/system.c2
-rw-r--r--usr.sbin/sysinstall/tcpip.c2
-rw-r--r--usr.sbin/sysinstall/user.c4
-rw-r--r--usr.sbin/sysinstall/variable.c2
12 files changed, 16 insertions, 16 deletions
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index b56a8e2..71bc616 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -1342,7 +1342,7 @@ DMenu MenuConfigure = {
NULL, dmenuSubmenu, NULL, &MenuMedia },
#ifdef WITH_MICE
{ " Mouse", "Configure your mouse",
- NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
+ NULL, dmenuSubmenu, NULL, &MenuMouse },
#endif
{ " Networking", "Configure additional network services",
NULL, dmenuSubmenu, NULL, &MenuNetworking },
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index e4c939f..938cfad 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -871,7 +871,7 @@ extern void slice_wizard(Disk *d);
/*
* Macros. Please find a better place for us!
*/
-#define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : NULL)
+#define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : (Boolean)0)
#define DEVICE_GET(d, b, f) ((d) != NULL ? (d)->get((d), (b), (f)) : NULL)
#define DEVICE_SHUTDOWN(d) ((d) != NULL ? (d)->shutdown((d)) : (void)0)
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 906dec2..65c353a 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -140,7 +140,7 @@ systemInitialize(int argc, char **argv)
globalsInit();
i = sizeof(boothowto);
- if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, NULL) &&
+ if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, 0) &&
(i == sizeof(boothowto)) && (boothowto & RB_VERBOSE))
variable_set2(VAR_DEBUG, "YES", 0);
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
index e132862..e86104f 100644
--- a/usr.sbin/sade/variable.c
+++ b/usr.sbin/sade/variable.c
@@ -205,7 +205,7 @@ variable_check2(char *data)
*cp3 = '\0';
cp2 = variable_get(tmp);
if (cp2 != NULL) {
- if (*cp == NULL)
+ if (*cp == '\0')
return 2;
else
return strcmp(cp, cp2) == 0 ? 1 : 0;
diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c
index f79974b..7d130f1 100644
--- a/usr.sbin/sysinstall/anonFTP.c
+++ b/usr.sbin/sysinstall/anonFTP.c
@@ -115,7 +115,7 @@ static Layout layout[] = {
{ 19, 35, 0, 0,
"CANCEL", "Select this if you wish to cancel this screen",
&cancelbutton, BUTTONOBJ, NULL },
- { NULL },
+ { 0 },
};
static int
diff --git a/usr.sbin/sysinstall/dhcp.c b/usr.sbin/sysinstall/dhcp.c
index a74a72b..fa35580 100644
--- a/usr.sbin/sysinstall/dhcp.c
+++ b/usr.sbin/sysinstall/dhcp.c
@@ -89,7 +89,7 @@ dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
continue;
}
if ((tptr = (char *)strchr(tempbuf, ';')) && (*(tptr + 1) == 0)) {
- *tptr = NULL;
+ *tptr = '\0';
endedflag = 1;
}
if (!isalnum(tempbuf[0])) {
@@ -114,7 +114,7 @@ dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
continue;
}
if ((tptr = (char *)strchr(tempbuf, ';')) && (*(tptr + 1) == 0)) {
- *tptr = NULL;
+ *tptr = '\0';
endedflag = 1;
}
if (tempbuf[0] == '"') {
@@ -135,14 +135,14 @@ dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
strcpy(ipaddr, optbuf);
} else if (!strcasecmp("routers", optname)) {
if((tptr = (char *)strchr(optbuf, ',')))
- *tptr = NULL;
+ *tptr = '\0';
strcpy(gateway, optbuf);
} else if (!strcasecmp("subnet-mask", optname)) {
strcpy(netmask, optbuf);
} else if (!strcasecmp("domain-name-servers", optname)) {
/* <jkh> ...one value per property */
if((tptr = (char *)strchr(optbuf, ',')))
- *tptr = NULL;
+ *tptr = '\0';
strcpy(nameserver, optbuf);
}
if (endedflag) {
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index b56a8e2..71bc616 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -1342,7 +1342,7 @@ DMenu MenuConfigure = {
NULL, dmenuSubmenu, NULL, &MenuMedia },
#ifdef WITH_MICE
{ " Mouse", "Configure your mouse",
- NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
+ NULL, dmenuSubmenu, NULL, &MenuMouse },
#endif
{ " Networking", "Configure additional network services",
NULL, dmenuSubmenu, NULL, &MenuNetworking },
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index e4c939f..938cfad 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -871,7 +871,7 @@ extern void slice_wizard(Disk *d);
/*
* Macros. Please find a better place for us!
*/
-#define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : NULL)
+#define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : (Boolean)0)
#define DEVICE_GET(d, b, f) ((d) != NULL ? (d)->get((d), (b), (f)) : NULL)
#define DEVICE_SHUTDOWN(d) ((d) != NULL ? (d)->shutdown((d)) : (void)0)
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 906dec2..65c353a 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -140,7 +140,7 @@ systemInitialize(int argc, char **argv)
globalsInit();
i = sizeof(boothowto);
- if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, NULL) &&
+ if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, 0) &&
(i == sizeof(boothowto)) && (boothowto & RB_VERBOSE))
variable_set2(VAR_DEBUG, "YES", 0);
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 2f9dc8d..db1539d 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -103,7 +103,7 @@ static Layout layout[] = {
{ 19, 35, 0, 0,
"CANCEL", "Select this if you wish to cancel this screen",
&cancelbutton, BUTTONOBJ, NULL },
- { NULL },
+ { 0 },
};
#define _validByte(b) ((b) >= 0 && (b) <= 255)
diff --git a/usr.sbin/sysinstall/user.c b/usr.sbin/sysinstall/user.c
index 1b0b845..ecee440 100644
--- a/usr.sbin/sysinstall/user.c
+++ b/usr.sbin/sysinstall/user.c
@@ -102,7 +102,7 @@ static Layout groupLayout[] = {
{ 18, 35, 0, 0,
"CANCEL", "Select this if you wish to cancel this screen",
&cancelbutton, BUTTONOBJ, NULL },
- { NULL },
+ { 0 },
};
/* The user configuration menu. */
@@ -147,7 +147,7 @@ static Layout userLayout[] = {
{ 18, 35, 0, 0,
"CANCEL", "Select this if you wish to cancel this screen",
&cancelbutton, BUTTONOBJ, NULL },
- { NULL },
+ { 0 },
};
/* whine */
diff --git a/usr.sbin/sysinstall/variable.c b/usr.sbin/sysinstall/variable.c
index e132862..e86104f 100644
--- a/usr.sbin/sysinstall/variable.c
+++ b/usr.sbin/sysinstall/variable.c
@@ -205,7 +205,7 @@ variable_check2(char *data)
*cp3 = '\0';
cp2 = variable_get(tmp);
if (cp2 != NULL) {
- if (*cp == NULL)
+ if (*cp == '\0')
return 2;
else
return strcmp(cp, cp2) == 0 ? 1 : 0;
OpenPOWER on IntegriCloud