summaryrefslogtreecommitdiffstats
path: root/sbin/raidctl
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/raidctl')
-rw-r--r--sbin/raidctl/raidctl.c2
-rw-r--r--sbin/raidctl/rf_configure.c2
2 files changed, 2 insertions, 2 deletions
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(
OpenPOWER on IntegriCloud