summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/atm/atmconfig/diag.c2
-rw-r--r--sbin/kldconfig/kldconfig.c4
-rw-r--r--sbin/raidctl/raidctl.c2
-rw-r--r--sbin/raidctl/rf_configure.c2
-rw-r--r--sbin/swapon/swapon.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/sbin/atm/atmconfig/diag.c b/sbin/atm/atmconfig/diag.c
index 733c879..bd8bc7e 100644
--- a/sbin/atm/atmconfig/diag.c
+++ b/sbin/atm/atmconfig/diag.c
@@ -232,7 +232,7 @@ phy_fetch(const char *ifname, const char *var, void *val, size_t len,
if (asprintf(&str, "hw.atm.%s.phy_%s", ifname, var) == -1)
err(1, NULL);
- if (sysctlbyname(str, val, &len, NULL, NULL) == -1) {
+ if (sysctlbyname(str, val, &len, NULL, 0) == -1) {
if (err_fatal || errno != ENOENT)
err(1, "%s", str);
free(str);
diff --git a/sbin/kldconfig/kldconfig.c b/sbin/kldconfig/kldconfig.c
index 0f7c721..1f53d7c 100644
--- a/sbin/kldconfig/kldconfig.c
+++ b/sbin/kldconfig/kldconfig.c
@@ -113,14 +113,14 @@ getpath(void)
if (miblen == 0)
getmib();
- if (sysctl(mib, miblen, NULL, &sz, NULL, NULL) == -1)
+ if (sysctl(mib, miblen, NULL, &sz, NULL, 0) == -1)
err(1, "getting path: sysctl(%s) - size only", pathctl);
if ((path = malloc(sz + 1)) == NULL) {
errno = ENOMEM;
err(1, "allocating %lu bytes for the path",
(unsigned long)sz+1);
}
- if (sysctl(mib, miblen, path, &sz, NULL, NULL) == -1)
+ if (sysctl(mib, miblen, path, &sz, NULL, 0) == -1)
err(1, "getting path: sysctl(%s)", pathctl);
modpath = path;
}
diff --git a/sbin/raidctl/raidctl.c b/sbin/raidctl/raidctl.c
index 4b7d27d..117e651 100644
--- a/sbin/raidctl/raidctl.c
+++ b/sbin/raidctl/raidctl.c
@@ -272,7 +272,7 @@ main(argc,argv)
argc -= optind;
argv += optind;
- if ((num_options > 1) || (argc == NULL))
+ if ((num_options > 1) || (argc == 0))
usage();
strncpy(name,argv[0],PATH_MAX);
diff --git a/sbin/raidctl/rf_configure.c b/sbin/raidctl/rf_configure.c
index 8df7889..2970467 100644
--- a/sbin/raidctl/rf_configure.c
+++ b/sbin/raidctl/rf_configure.c
@@ -249,7 +249,7 @@ rf_MakeConfig(configname, cfgPtr)
}
/* Get rid of the newline at the end of the string */
if ((bfr1 = strchr(&bfr[0], '\n')) != NULL)
- *bfr1 = NULL;
+ *bfr1 = '\0';
/* Make sure the device exists */
if ((devfd = open(&bfr[0], O_RDWR)) < 0) {
RF_ERRORMSG2(
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 063eff4..edcc998 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -254,7 +254,7 @@ swaplist(int lflag, int sflag, int hflag)
for (n = 0; ; ++n) {
mib[mibsize] = n;
size = sizeof xsw;
- if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, NULL) == -1)
+ if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, 0) == -1)
break;
if (xsw.xsw_version != XSWDEV_VERSION)
errx(1, "xswdev version mismatch");
OpenPOWER on IntegriCloud