summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_dump.c2
-rw-r--r--sys/kern/kern_kthread.c2
-rw-r--r--sys/kern/kern_proc.c2
-rw-r--r--sys/kern/kern_sysctl.c4
-rw-r--r--sys/kern/link_elf.c4
-rw-r--r--sys/kern/link_elf_obj.c4
-rw-r--r--sys/kern/sysv_sem.c4
-rw-r--r--sys/kern/uipc_mbuf.c2
-rw-r--r--sys/kern/uipc_sockbuf.c6
-rw-r--r--sys/kern/uipc_syscalls.c2
-rw-r--r--sys/kern/vfs_cluster.c2
-rw-r--r--sys/kern/vfs_export.c2
-rw-r--r--sys/kern/vfs_lookup.c4
-rw-r--r--sys/libkern/strtol.c2
-rw-r--r--sys/libkern/strtoq.c2
-rw-r--r--sys/libkern/strtoul.c2
-rw-r--r--sys/libkern/strtouq.c2
17 files changed, 24 insertions, 24 deletions
diff --git a/sys/kern/kern_dump.c b/sys/kern/kern_dump.c
index 1fd2fdd..c82272f 100644
--- a/sys/kern/kern_dump.c
+++ b/sys/kern/kern_dump.c
@@ -174,7 +174,7 @@ dumpsys_cb_dumpdata(struct dump_pa *mdp, int seqnr, void *arg)
error = 0; /* catch case in which chunk size is 0 */
counter = 0; /* Update twiddle every 16MB */
- va = 0;
+ va = NULL;
pgs = mdp->pa_size / PAGE_SIZE;
pa = mdp->pa_start;
maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS);
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 134e9a2..7c0d6b5 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -445,7 +445,7 @@ kproc_kthread_add(void (*func)(void *), void *arg,
char buf[100];
struct thread *td;
- if (*procptr == 0) {
+ if (*procptr == NULL) {
error = kproc_create(func, arg,
procptr, flags, pages, "%s", procname);
if (error)
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index e980176..9a41165 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1444,7 +1444,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS)
p = LIST_FIRST(&allproc);
else
p = LIST_FIRST(&zombproc);
- for (; p != 0; p = LIST_NEXT(p, p_list)) {
+ for (; p != NULL; p = LIST_NEXT(p, p_list)) {
/*
* Skip embryonic processes.
*/
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index f57cd58..aae705e 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -912,7 +912,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS)
name++;
continue;
}
- lsp2 = 0;
+ lsp2 = NULL;
SLIST_FOREACH(oid, lsp, oid_link) {
if (oid->oid_number != *name)
continue;
@@ -1083,7 +1083,7 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS)
{
char *p;
int error, oid[CTL_MAXNAME], len = 0;
- struct sysctl_oid *op = 0;
+ struct sysctl_oid *op = NULL;
struct rm_priotracker tracker;
if (!req->newlen)
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index 1579c28..349a95e 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -1382,7 +1382,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
u_long diff = off;
u_long st_value;
const Elf_Sym* es;
- const Elf_Sym* best = 0;
+ const Elf_Sym* best = NULL;
int i;
for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) {
@@ -1400,7 +1400,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
}
}
}
- if (best == 0)
+ if (best == NULL)
*diffp = off;
else
*diffp = diff;
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index 575a706..544bd253 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -1180,7 +1180,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
u_long diff = off;
u_long st_value;
const Elf_Sym *es;
- const Elf_Sym *best = 0;
+ const Elf_Sym *best = NULL;
int i;
for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) {
@@ -1198,7 +1198,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value,
}
}
}
- if (best == 0)
+ if (best == NULL)
*diffp = off;
else
*diffp = diff;
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 22616b9..0063916 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -980,8 +980,8 @@ sys_semop(struct thread *td, struct semop_args *uap)
size_t nsops = uap->nsops;
struct sembuf *sops;
struct semid_kernel *semakptr;
- struct sembuf *sopptr = 0;
- struct sem *semptr = 0;
+ struct sembuf *sopptr = NULL;
+ struct sem *semptr = NULL;
struct sem_undo *suptr;
struct mtx *sema_mtxp;
size_t i, j, k;
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 62dfda6..84354f3 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -459,7 +459,7 @@ m_copym(struct mbuf *m, int off0, int len, int wait)
m = m->m_next;
}
np = &top;
- top = 0;
+ top = NULL;
while (len > 0) {
if (m == NULL) {
KASSERT(len == M_COPYALL,
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 0cdd43b..cf9f4b1 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -593,7 +593,7 @@ sbappend_locked(struct sockbuf *sb, struct mbuf *m, int flags)
SOCKBUF_LOCK_ASSERT(sb);
- if (m == 0)
+ if (m == NULL)
return;
sbm_clrprotoflags(m, flags);
SBLASTRECORDCHK(sb);
@@ -746,7 +746,7 @@ sbappendrecord_locked(struct sockbuf *sb, struct mbuf *m0)
SOCKBUF_LOCK_ASSERT(sb);
- if (m0 == 0)
+ if (m0 == NULL)
return;
m_clrprotoflags(m0);
/*
@@ -885,7 +885,7 @@ sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0,
SOCKBUF_LOCK_ASSERT(sb);
- if (control == 0)
+ if (control == NULL)
panic("sbappendcontrol_locked");
space = m_length(control, &n) + m_length(m0, NULL);
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 79444e0..05703ef 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -430,7 +430,7 @@ kern_accept4(struct thread *td, int s, struct sockaddr **name,
(void) fo_ioctl(nfp, FIONBIO, &tmp, td->td_ucred, td);
tmp = fflag & FASYNC;
(void) fo_ioctl(nfp, FIOASYNC, &tmp, td->td_ucred, td);
- sa = 0;
+ sa = NULL;
error = soaccept(so, &sa);
if (error != 0)
goto noconnection;
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 40dc0c0..ea902d7 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -368,7 +368,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
return tbp;
bp = trypbuf(&cluster_pbuf_freecnt);
- if (bp == 0)
+ if (bp == NULL)
return tbp;
/*
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 9eb523c..e7a709d 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -102,7 +102,7 @@ vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
register struct radix_node_head *rnh;
register int i;
struct radix_node *rn;
- struct sockaddr *saddr, *smask = 0;
+ struct sockaddr *saddr, *smask = NULL;
#if defined(INET6) || defined(INET)
int off;
#endif
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index f4b0596..a1116e0 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -486,7 +486,7 @@ int
lookup(struct nameidata *ndp)
{
char *cp; /* pointer into pathname argument */
- struct vnode *dp = 0; /* the directory we are searching */
+ struct vnode *dp = NULL; /* the directory we are searching */
struct vnode *tdp; /* saved dp */
struct mount *mp; /* mount table entry */
struct prison *pr;
@@ -949,7 +949,7 @@ bad:
int
relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
{
- struct vnode *dp = 0; /* the directory we are searching */
+ struct vnode *dp = NULL; /* the directory we are searching */
int wantparent; /* 1 => wantparent or lockparent flag */
int rdonly; /* lookup read-only flag bit */
int error = 0;
diff --git a/sys/libkern/strtol.c b/sys/libkern/strtol.c
index 4d64025..ea7dd55 100644
--- a/sys/libkern/strtol.c
+++ b/sys/libkern/strtol.c
@@ -123,7 +123,7 @@ strtol(nptr, endptr, base)
acc = neg ? LONG_MIN : LONG_MAX;
} else if (neg)
acc = -acc;
- if (endptr != 0)
+ if (endptr != NULL)
*endptr = __DECONST(char *, any ? s - 1 : nptr);
return (acc);
}
diff --git a/sys/libkern/strtoq.c b/sys/libkern/strtoq.c
index d855056..e83adb1 100644
--- a/sys/libkern/strtoq.c
+++ b/sys/libkern/strtoq.c
@@ -124,7 +124,7 @@ strtoq(const char *nptr, char **endptr, int base)
acc = neg ? QUAD_MIN : QUAD_MAX;
} else if (neg)
acc = -acc;
- if (endptr != 0)
+ if (endptr != NULL)
*endptr = __DECONST(char *, any ? s - 1 : nptr);
return (acc);
}
diff --git a/sys/libkern/strtoul.c b/sys/libkern/strtoul.c
index f7399dc..44adf5a 100644
--- a/sys/libkern/strtoul.c
+++ b/sys/libkern/strtoul.c
@@ -102,7 +102,7 @@ strtoul(nptr, endptr, base)
acc = ULONG_MAX;
} else if (neg)
acc = -acc;
- if (endptr != 0)
+ if (endptr != NULL)
*endptr = __DECONST(char *, any ? s - 1 : nptr);
return (acc);
}
diff --git a/sys/libkern/strtouq.c b/sys/libkern/strtouq.c
index f8303a0..49c3750 100644
--- a/sys/libkern/strtouq.c
+++ b/sys/libkern/strtouq.c
@@ -101,7 +101,7 @@ strtouq(const char *nptr, char **endptr, int base)
acc = UQUAD_MAX;
} else if (neg)
acc = -acc;
- if (endptr != 0)
+ if (endptr != NULL)
*endptr = __DECONST(char *, any ? s - 1 : nptr);
return (acc);
}
OpenPOWER on IntegriCloud