summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ismounted.c2
-rw-r--r--libblkid/src/devno.c2
-rw-r--r--misc-utils/whereis.c6
-rw-r--r--mount-deprecated/mount.c2
-rw-r--r--term-utils/agetty.c4
-rw-r--r--text-utils/more.c4
6 files changed, 10 insertions, 10 deletions
diff --git a/lib/ismounted.c b/lib/ismounted.c
index 5611ab385..d9f1f57d0 100644
--- a/lib/ismounted.c
+++ b/lib/ismounted.c
@@ -91,7 +91,7 @@ static int check_mntent_file(const char *mtab_file, const char *file,
}
}
- if (mnt == 0) {
+ if (mnt == NULL) {
#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
/*
* Do an extra check to see if this is the root device. We
diff --git a/libblkid/src/devno.c b/libblkid/src/devno.c
index c54903566..906c91fcd 100644
--- a/libblkid/src/devno.c
+++ b/libblkid/src/devno.c
@@ -115,7 +115,7 @@ void blkid__scan_dir(char *dirname, dev_t devno, struct dir_list **list,
if ((dir = opendir(dirname)) == NULL)
return;
- while ((dp = readdir(dir)) != 0) {
+ while ((dp = readdir(dir)) != NULL) {
#ifdef _DIRENT_HAVE_D_TYPE
if (dp->d_type != DT_UNKNOWN && dp->d_type != DT_BLK &&
dp->d_type != DT_LNK && dp->d_type != DT_DIR)
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c
index d253f375d..4194ad5dc 100644
--- a/misc-utils/whereis.c
+++ b/misc-utils/whereis.c
@@ -304,7 +304,7 @@ findv(char **dirv, int dirc, char *cp)
static void
looksrc(char *cp)
{
- if (Sflag == 0)
+ if (Sflag == NULL)
findv(srcdirs, ARRAY_SIZE(srcdirs)-1, cp);
else
findv(Sflag, Scnt, cp);
@@ -313,7 +313,7 @@ looksrc(char *cp)
static void
lookbin(char *cp)
{
- if (Bflag == 0) {
+ if (Bflag == NULL) {
findv(bindirs, ARRAY_SIZE(bindirs)-1, cp);
while (*pathdir_p)
findin(*pathdir_p++, cp); /* look $PATH */
@@ -324,7 +324,7 @@ lookbin(char *cp)
static void
lookman(char *cp)
{
- if (Mflag == 0)
+ if (Mflag == NULL)
findv(mandirs, ARRAY_SIZE(mandirs)-1, cp);
else
findv(Mflag, Mcnt, cp);
diff --git a/mount-deprecated/mount.c b/mount-deprecated/mount.c
index 3190d2f8b..5031683b9 100644
--- a/mount-deprecated/mount.c
+++ b/mount-deprecated/mount.c
@@ -1668,7 +1668,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
/* Mount failed, complain, but don't die. */
- if (types == 0) {
+ if (types == NULL) {
if (restricted)
error (_("mount: I could not determine the filesystem type, "
"and none was specified"));
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index c79c41665..b9a14b328 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -358,7 +358,7 @@ int main(int argc, char **argv)
/* Read the login name. */
debug("reading login name\n");
while ((username =
- get_logname(&options, &termios, &chardata)) == 0)
+ get_logname(&options, &termios, &chardata)) == NULL)
if ((options.flags & F_VCONSOLE) == 0)
next_speed(&options, &termios);
}
@@ -747,7 +747,7 @@ static void parse_speeds(struct options *op, char *arg)
char *cp;
debug("entered parse_speeds\n");
- for (cp = strtok(arg, ","); cp != 0; cp = strtok((char *)0, ",")) {
+ for (cp = strtok(arg, ","); cp != NULL; cp = strtok((char *)0, ",")) {
if ((op->speeds[op->numspeed++] = bcode(cp)) <= 0)
log_err(_("bad speed: %s"), cp);
if (op->numspeed >= MAX_SPEED)
diff --git a/text-utils/more.c b/text-utils/more.c
index 2ebdd75ef..496b1168f 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -1785,7 +1785,7 @@ void initterm(void)
}
}
#endif /* do_SIGTTOU */
- if ((term = getenv("TERM")) == 0) {
+ if ((term = getenv("TERM")) == NULL) {
dumb++;
ul_opt = 0;
}
@@ -1856,7 +1856,7 @@ void initterm(void)
if ((padstr = my_tgetstr(TERM_PAD_CHAR)) != NULL)
PC = *padstr;
Home = my_tgetstr(TERM_HOME);
- if (Home == 0 || *Home == '\0') {
+ if (Home == NULL || *Home == '\0') {
if ((cursorm =
my_tgetstr(TERM_CURSOR_ADDRESS)) != NULL) {
const char *t =