From owner-svn-src-all@freebsd.org Mon May 16 00:34:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7155FB337FC; Mon, 16 May 2016 00:34:49 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4309D1C0B; Mon, 16 May 2016 00:34:49 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4G0Ympr051489; Mon, 16 May 2016 00:34:48 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4G0YmXt051488; Mon, 16 May 2016 00:34:48 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201605160034.u4G0YmXt051488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 16 May 2016 00:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299874 - head/sbin/init X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 00:34:49 -0000 Author: araujo Date: Mon May 16 00:34:48 2016 New Revision: 299874 URL: https://svnweb.freebsd.org/changeset/base/299874 Log: For pointers use NULL instead of 0. MFC after: 2 weeks. Modified: head/sbin/init/init.c Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Mon May 16 00:25:24 2016 (r299873) +++ head/sbin/init/init.c Mon May 16 00:34:48 2016 (r299874) @@ -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); }