summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-05-16 00:34:48 +0000
committeraraujo <araujo@FreeBSD.org>2016-05-16 00:34:48 +0000
commit99b908a01dd97937729f2dd7f6b107dc0f90c714 (patch)
treeb300c0a5b82c01d166e78512b9faf05465da9994 /sbin
parent4d196a467d42ebc70eeb0b7276fcfe350b5570de (diff)
downloadFreeBSD-src-99b908a01dd97937729f2dd7f6b107dc0f90c714.zip
FreeBSD-src-99b908a01dd97937729f2dd7f6b107dc0f90c714.tar.gz
For pointers use NULL instead of 0.
MFC after: 2 weeks.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/init/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 5abdcd3..bda86b5 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -328,7 +328,7 @@ invalid:
if (kenv(KENV_GET, "init_script", kenv_value, sizeof(kenv_value)) > 0) {
state_func_t next_transition;
- if ((next_transition = run_script(kenv_value)) != 0)
+ if ((next_transition = run_script(kenv_value)) != NULL)
initial_transition = (state_t) next_transition;
}
@@ -909,7 +909,7 @@ single_user(void)
write_stderr(banner);
for (;;) {
clear = getpass("Password:");
- if (clear == 0 || *clear == '\0')
+ if (clear == NULL || *clear == '\0')
_exit(0);
password = crypt(clear, pp->pw_passwd);
bzero(clear, _PASSWORD_LEN);
@@ -1022,7 +1022,7 @@ runcom(void)
{
state_func_t next_transition;
- if ((next_transition = run_script(_PATH_RUNCOM)) != 0)
+ if ((next_transition = run_script(_PATH_RUNCOM)) != NULL)
return next_transition;
runcom_mode = AUTOBOOT; /* the default */
@@ -1208,7 +1208,7 @@ construct_argv(char *command)
char **argv = (char **) malloc(((strlen(command) + 1) / 2 + 1)
* sizeof (char *));
- if ((argv[argc++] = strk(command)) == 0) {
+ if ((argv[argc++] = strk(command)) == NULL) {
free(argv);
return (NULL);
}
OpenPOWER on IntegriCloud