summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libkeynote/keynote-ver.l4
-rw-r--r--lib/libkeynote/keynote.l4
-rw-r--r--lib/libusbhid/usage.c4
-rw-r--r--libexec/ld.so/alpha/rtld_machine.c12
-rw-r--r--libexec/ld.so/amd64/rtld_machine.c8
-rw-r--r--libexec/ld.so/arm/rtld_machine.c10
-rw-r--r--libexec/ld.so/hppa/rtld_machine.c8
-rw-r--r--libexec/ld.so/i386/rtld_machine.c8
-rw-r--r--libexec/ld.so/ldconfig/prebind.c6
-rw-r--r--libexec/ld.so/loader.c4
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c12
-rw-r--r--libexec/ld.so/sh/rtld_machine.c10
-rw-r--r--libexec/ld.so/sparc/rtld_machine.c12
-rw-r--r--libexec/ld.so/sparc64/rtld_machine.c12
-rw-r--r--sbin/atactl/atactl.c14
-rw-r--r--sbin/isakmpd/policy.c6
-rw-r--r--sbin/modload/elf.c4
-rw-r--r--sbin/mount/mount.c4
-rw-r--r--usr.bin/cdio/cddb.c4
-rw-r--r--usr.bin/ipcs/ipcs.c20
-rw-r--r--usr.bin/kdump/kdump.c4
-rw-r--r--usr.bin/mail/cmd1.c4
-rw-r--r--usr.bin/mail/cmd2.c22
-rw-r--r--usr.bin/mail/cmd3.c10
-rw-r--r--usr.bin/mail/collect.c4
-rw-r--r--usr.bin/mail/lex.c6
-rw-r--r--usr.bin/netstat/route.c6
-rw-r--r--usr.bin/oldrdist/expand.c4
-rw-r--r--usr.bin/rpcgen/rpc_hout.c4
-rw-r--r--usr.bin/tmux/cmd-display-message.c4
-rw-r--r--usr.bin/xstr/xstr.c4
-rw-r--r--usr.sbin/config/ukcutil.c8
-rw-r--r--usr.sbin/dvmrpd/rde_mfc.c5
-rw-r--r--usr.sbin/httpd/src/modules/keynote/mod_keynote.c6
-rw-r--r--usr.sbin/ppp/ppp/physical.h4
-rw-r--r--usr.sbin/procmap/procmap.c10
-rw-r--r--usr.sbin/rtadvd/rrenum.c4
-rw-r--r--usr.sbin/user/user.c4
-rw-r--r--usr.sbin/ypldap/aldap.c8
-rw-r--r--usr.sbin/ypserv/revnetgroup/revnetgroup.c4
40 files changed, 143 insertions, 148 deletions
diff --git a/lib/libkeynote/keynote-ver.l b/lib/libkeynote/keynote-ver.l
index d352cc37441..4813f0ecbaf 100644
--- a/lib/libkeynote/keynote-ver.l
+++ b/lib/libkeynote/keynote-ver.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: keynote-ver.l,v 1.14 2004/06/29 11:35:56 msf Exp $ */
+/* $OpenBSD: keynote-ver.l,v 1.15 2011/04/06 11:36:23 miod Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -252,7 +252,7 @@ read_environment(char *filename)
if (0)
{
yyunput(0, NULL);
- yy_flex_realloc(0, NULL);
+ yy_flex_realloc(0, 0);
}
}
diff --git a/lib/libkeynote/keynote.l b/lib/libkeynote/keynote.l
index 46e3291421f..d42aa2db270 100644
--- a/lib/libkeynote/keynote.l
+++ b/lib/libkeynote/keynote.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: keynote.l,v 1.18 2009/12/11 17:25:43 deraadt Exp $ */
+/* $OpenBSD: keynote.l,v 1.19 2011/04/06 11:36:23 miod Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -749,7 +749,7 @@ keynote_get_envlist(char *buf, char *bufend, int whichfield)
if (0)
{
yyunput(0, NULL);
- yy_flex_realloc(0, NULL);
+ yy_flex_realloc(0, 0);
}
return en;
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index 228dbb74c47..12f157d6eab 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usage.c,v 1.13 2007/09/03 14:26:54 deraadt Exp $ */
+/* $OpenBSD: usage.c,v 1.14 2011/04/06 11:36:25 miod Exp $ */
/* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */
/*
@@ -252,7 +252,7 @@ hid_parse_usage_page(const char *name)
int k;
if (!pages)
- return NULL;
+ return 0;
for (k = 0; k < npages; k++)
if (strcmp(pages[k].name, name) == 0)
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c
index ac97fd3b583..84a231c629c 100644
--- a/libexec/ld.so/alpha/rtld_machine.c
+++ b/libexec/ld.so/alpha/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.44 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.45 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -235,7 +235,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
pltgot = (Elf_Addr *)object->Dyn.info[DT_PLTGOT];
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -249,7 +249,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
- plt_addr = NULL;
+ plt_addr = 0;
object->plt_size = 0;
this = NULL;
ooff = _dl_find_symbol("__plt_start", &this,
@@ -263,15 +263,15 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
if (plt_addr == NULL)
- object->plt_start = NULL;
+ object->plt_start = 0;
else {
object->plt_start = ELF_TRUNC(plt_addr, _dl_pagesz);
object->plt_size += plt_addr - object->plt_start;
diff --git a/libexec/ld.so/amd64/rtld_machine.c b/libexec/ld.so/amd64/rtld_machine.c
index 6dad018143a..13af6d3b235 100644
--- a/libexec/ld.so/amd64/rtld_machine.c
+++ b/libexec/ld.so/amd64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.15 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.16 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2002,2004 Dale Rahn
@@ -399,7 +399,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_RELA)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -413,8 +413,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
diff --git a/libexec/ld.so/arm/rtld_machine.c b/libexec/ld.so/arm/rtld_machine.c
index 0ee18827cdd..6385a2f7911 100644
--- a/libexec/ld.so/arm/rtld_machine.c
+++ b/libexec/ld.so/arm/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.15 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.16 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -332,7 +332,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_REL)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -348,14 +348,14 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0; /* Text PLT on ARM */
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
- object->plt_start = NULL;
+ object->plt_start = 0;
if (!lazy) {
fails = _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ);
diff --git a/libexec/ld.so/hppa/rtld_machine.c b/libexec/ld.so/hppa/rtld_machine.c
index 73af16eb02e..3d33a937ca3 100644
--- a/libexec/ld.so/hppa/rtld_machine.c
+++ b/libexec/ld.so/hppa/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.22 2010/06/05 21:40:58 miod Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.23 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -308,7 +308,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->dyn.pltrel != DT_RELA)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -322,8 +322,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index 620a658fc78..bf258fe2203 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.24 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.25 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -401,7 +401,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_REL)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -415,8 +415,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->got_size = ooff + this->st_value - object->got_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
diff --git a/libexec/ld.so/ldconfig/prebind.c b/libexec/ld.so/ldconfig/prebind.c
index f9c974fd69e..81a3f87effc 100644
--- a/libexec/ld.so/ldconfig/prebind.c
+++ b/libexec/ld.so/ldconfig/prebind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prebind.c,v 1.12 2010/03/30 17:42:50 zinovik Exp $ */
+/* $OpenBSD: prebind.c,v 1.13 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
@@ -665,7 +665,7 @@ elf_load_object(void *pexe, const char *name)
object->dyn.pltrelsz);
object->dyn.jmprel = (long)plt;
} else {
- object->dyn.jmprel = NULL;
+ object->dyn.jmprel = 0;
}
if (object->dyn.rpath != NULL){
object->dyn.rpath = strdup(object->dyn.rpath);
@@ -748,7 +748,7 @@ load_obj_needed(struct elf_object *object)
int err;
needed_list = (Elf_Word *)object->dyn.needed;
- for (i = 0; needed_list[i] != NULL; i++) {
+ for (i = 0; needed_list[i] != 0; i++) {
if (verbose > 1)
printf("lib: %s\n", needed_list[i] +
object->dyn.strtab);
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c
index 6b91934e082..042395519d1 100644
--- a/libexec/ld.so/loader.c
+++ b/libexec/ld.so/loader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loader.c,v 1.121 2010/12/07 18:29:28 drahn Exp $ */
+/* $OpenBSD: loader.c,v 1.122 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -639,7 +639,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp)
argv = (char **)stack;
envp = &argv[argc + 1];
stack = (long *)envp;
- while (*stack++ != NULL)
+ while (*stack++ != 0L)
;
/*
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c
index 6fd57bc0670..1981f7faedd 100644
--- a/libexec/ld.so/powerpc/rtld_machine.c
+++ b/libexec/ld.so/powerpc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.47 2010/05/03 04:03:03 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.48 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -445,7 +445,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_RELA)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -477,15 +477,15 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
- if (plt_addr == NULL)
- object->plt_start = NULL;
+ if (plt_addr == 0)
+ object->plt_start = 0;
else {
object->plt_start = ELF_TRUNC(plt_addr, _dl_pagesz);
object->plt_size += plt_addr - object->plt_start;
diff --git a/libexec/ld.so/sh/rtld_machine.c b/libexec/ld.so/sh/rtld_machine.c
index 28b16c0b4a3..c6df59ddf0b 100644
--- a/libexec/ld.so/sh/rtld_machine.c
+++ b/libexec/ld.so/sh/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.14 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.15 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -779,7 +779,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_RELA)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -795,14 +795,14 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size = 0; /* Text PLT on ARM */
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
- object->plt_start = NULL;
+ object->plt_start = 0;
if (!lazy) {
fails = _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ);
diff --git a/libexec/ld.so/sparc/rtld_machine.c b/libexec/ld.so/sparc/rtld_machine.c
index 904965b0994..61102529906 100644
--- a/libexec/ld.so/sparc/rtld_machine.c
+++ b/libexec/ld.so/sparc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.32 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.33 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -396,7 +396,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
__asm __volatile("nop;nop;nop;nop;nop");
}
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -428,15 +428,15 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
- if (plt_addr == NULL)
- object->plt_start = NULL;
+ if (plt_addr == 0)
+ object->plt_start = 0;
else {
object->plt_start = ELF_TRUNC(plt_addr, _dl_pagesz);
object->plt_size += plt_addr - object->plt_start;
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c
index feb9983b34b..1d0ae9af8e4 100644
--- a/libexec/ld.so/sparc64/rtld_machine.c
+++ b/libexec/ld.so/sparc64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.45 2010/05/02 04:57:01 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.46 2011/04/06 11:36:25 miod Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -704,7 +704,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->Dyn.info[DT_PLTREL] != DT_RELA)
return (0);
- object->got_addr = NULL;
+ object->got_addr = 0;
object->got_size = 0;
this = NULL;
ooff = _dl_find_symbol("__got_start", &this,
@@ -736,15 +736,15 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (this != NULL)
object->plt_size = ooff + this->st_value - plt_addr;
- if (object->got_addr == NULL)
- object->got_start = NULL;
+ if (object->got_addr == 0)
+ object->got_start = 0;
else {
object->got_start = ELF_TRUNC(object->got_addr, _dl_pagesz);
object->got_size += object->got_addr - object->got_start;
object->got_size = ELF_ROUND(object->got_size, _dl_pagesz);
}
- if (plt_addr == NULL)
- object->plt_start = NULL;
+ if (plt_addr == 0)
+ object->plt_start = 0;
else {
object->plt_start = ELF_TRUNC(plt_addr, _dl_pagesz);
object->plt_size += plt_addr - object->plt_start;
diff --git a/sbin/atactl/atactl.c b/sbin/atactl/atactl.c
index 84a51785668..25c25f4bdc7 100644
--- a/sbin/atactl/atactl.c
+++ b/sbin/atactl/atactl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atactl.c,v 1.42 2009/04/16 07:40:44 grange Exp $ */
+/* $OpenBSD: atactl.c,v 1.43 2011/04/06 11:36:25 miod Exp $ */
/* $NetBSD: atactl.c,v 1.4 1999/02/24 18:49:14 jwise Exp $ */
/*-
@@ -154,7 +154,7 @@ struct bitinfo ata_caps[] = {
{ ATA_CAP_STBY, "ATA standby timer values" },
{ WDC_CAP_IORDY, "IORDY operation" },
{ WDC_CAP_IORDY_DSBL, "IORDY disabling" },
- { NULL, NULL },
+ { 0, NULL },
};
struct bitinfo ata_vers[] = {
@@ -172,7 +172,7 @@ struct bitinfo ata_vers[] = {
{ WDC_VER_ATA12, "ATA-12" },
{ WDC_VER_ATA13, "ATA-13" },
{ WDC_VER_ATA14, "ATA-14" },
- { NULL, NULL },
+ { 0, NULL },
};
struct bitinfo ata_cmd_set1[] = {
@@ -190,7 +190,7 @@ struct bitinfo ata_cmd_set1[] = {
{ WDC_CMD1_REMOV, "Removable Media feature set" },
{ WDC_CMD1_SEC, "Security Mode feature set" },
{ WDC_CMD1_SMART, "SMART feature set" },
- { NULL, NULL },
+ { 0, NULL },
};
struct bitinfo ata_cmd_set2[] = {
@@ -207,7 +207,7 @@ struct bitinfo ata_cmd_set2[] = {
{ ATA_CMD2_CFA, "CFA feature set" },
{ ATA_CMD2_RWQ, "READ/WRITE DMA QUEUED commands" },
{ WDC_CMD2_DM, "DOWNLOAD MICROCODE command" },
- { NULL, NULL },
+ { 0, NULL },
};
struct bitinfo ata_cmd_ext[] = {
@@ -215,7 +215,7 @@ struct bitinfo ata_cmd_ext[] = {
{ ATAPI_CMDE_MSER, "Media serial number" },
{ ATAPI_CMDE_TEST, "SMART self-test" },
{ ATAPI_CMDE_SLOG, "SMART error logging" },
- { NULL, NULL },
+ { 0, NULL },
};
/*
@@ -447,7 +447,7 @@ void
print_bitinfo(const char *f, u_int bits, struct bitinfo *binfo)
{
- for (; binfo->bitmask != NULL; binfo++)
+ for (; binfo->bitmask != 0; binfo++)
if (bits & binfo->bitmask)
printf(f, binfo->string);
}
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index 190385801ec..920cd6fcad8 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.92 2010/09/22 13:45:16 mikeb Exp $ */
+/* $OpenBSD: policy.c,v 1.93 2011/04/06 11:36:25 miod Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -1737,12 +1737,12 @@ policy_callback(char *name)
return phase_1;
if (strcmp(name, "GMTTimeOfDay") == 0) {
- tt = time((time_t)NULL);
+ tt = time((time_t *)NULL);
strftime(mytimeofday, 14, "%Y%m%d%H%M%S", gmtime(&tt));
return mytimeofday;
}
if (strcmp(name, "LocalTimeOfDay") == 0) {
- tt = time((time_t)NULL);
+ tt = time((time_t *)NULL);
strftime(mytimeofday, 14, "%Y%m%d%H%M%S", localtime(&tt));
return mytimeofday;
}
diff --git a/sbin/modload/elf.c b/sbin/modload/elf.c
index fe223ece602..d6c3da523e0 100644
--- a/sbin/modload/elf.c
+++ b/sbin/modload/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.7 2004/12/28 09:05:18 deraadt Exp $ */
+/* $OpenBSD: elf.c,v 1.8 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: elf.c,v 1.8 2002/01/03 21:45:58 jdolecek Exp $ */
/*
@@ -328,7 +328,7 @@ elf_linkcmd(char *buf, size_t len, const char *kernel,
{
ssize_t n;
- if (data_offset == NULL)
+ if (data_offset == 0)
n = snprintf(buf, len, LINKCMD, kernel, entry,
outfile, address, object);
else
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index ddad3f35ed2..8f156df3998 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.c,v 1.50 2009/10/27 23:59:33 deraadt Exp $ */
+/* $OpenBSD: mount.c,v 1.51 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp $ */
/*
@@ -93,7 +93,7 @@ static struct opt {
{ MNT_ROOTFS, 1, "root file system", "" },
{ MNT_SYNCHRONOUS, 0, "synchronous", "sync" },
{ MNT_SOFTDEP, 0, "softdep", "softdep" },
- { NULL, 0, "", "" }
+ { 0, 0, "", "" }
};
int
diff --git a/usr.bin/cdio/cddb.c b/usr.bin/cdio/cddb.c
index 4882f086d9d..848ddfa8450 100644
--- a/usr.bin/cdio/cddb.c
+++ b/usr.bin/cdio/cddb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cddb.c,v 1.15 2008/04/27 23:06:40 fgsch Exp $ */
+/* $OpenBSD: cddb.c,v 1.16 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 2002 Marc Espie.
*
@@ -295,7 +295,7 @@ cddb(const char *host_port, int n, struct cd_toc_entry *e, char *arg)
}
if (strcmp(line, "211") == 0 || strcmp(line, "212") == 0) {
int number = strtonum(arg, 0, INT_MAX, &errstr);
- if (errstr != NULL && *arg != NULL) {
+ if (errstr != NULL && *arg != '\0') {
warnx("cddb: invalid index");
goto end;
}
diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c
index 22044023160..0e08268550e 100644
--- a/usr.bin/ipcs/ipcs.c
+++ b/usr.bin/ipcs/ipcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipcs.c,v 1.23 2008/06/26 05:42:21 ray Exp $ */
+/* $OpenBSD: ipcs.c,v 1.24 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: ipcs.c,v 1.25 2000/06/16 03:58:20 simonb Exp $ */
/*-
@@ -448,7 +448,7 @@ msg_sysctl(void)
mib[0] = CTL_KERN;
mib[1] = KERN_SYSVMSG;
len = sizeof(valid);
- if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVMSG)");
return;
}
@@ -465,7 +465,7 @@ msg_sysctl(void)
/* totals only */
len = sizeof(struct msginfo);
} else {
- if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_MSG_INFO)");
return;
}
@@ -474,7 +474,7 @@ msg_sysctl(void)
if ((buf = malloc(len)) == NULL)
err(1, "malloc");
msgsi = (struct msg_sysctl_info *)buf;
- if (sysctl(mib, 3, msgsi, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, msgsi, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_MSG_INFO)");
return;
}
@@ -519,7 +519,7 @@ shm_sysctl(void)
mib[0] = CTL_KERN;
mib[1] = KERN_SYSVSHM;
len = sizeof(valid);
- if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVSHM)");
return;
}
@@ -537,7 +537,7 @@ shm_sysctl(void)
/* totals only */
len = sizeof(struct shminfo);
} else {
- if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_SHM_INFO)");
return;
}
@@ -546,7 +546,7 @@ shm_sysctl(void)
if ((buf = malloc(len)) == NULL)
err(1, "malloc");
shmsi = (struct shm_sysctl_info *)buf;
- if (sysctl(mib, 3, shmsi, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, shmsi, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_SHM_INFO)");
return;
}
@@ -590,7 +590,7 @@ sem_sysctl(void)
mib[0] = CTL_KERN;
mib[1] = KERN_SYSVSEM;
len = sizeof(valid);
- if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVSEM)");
return;
}
@@ -608,7 +608,7 @@ sem_sysctl(void)
/* totals only */
len = sizeof(struct seminfo);
} else {
- if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_SEM_INFO)");
return;
}
@@ -617,7 +617,7 @@ sem_sysctl(void)
if ((buf = malloc(len)) == NULL)
err(1, "malloc");
semsi = (struct sem_sysctl_info *)buf;
- if (sysctl(mib, 3, semsi, &len, NULL, NULL) < 0) {
+ if (sysctl(mib, 3, semsi, &len, NULL, 0) < 0) {
warn("sysctl(KERN_SYSVIPC_SEM_INFO)");
return;
}
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 5cc7f27ab55..cae3ea7830d 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.48 2011/04/05 15:24:32 guenther Exp $ */
+/* $OpenBSD: kdump.c,v 1.49 2011/04/06 11:36:26 miod Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -96,7 +96,7 @@ static struct emulation emulations[] = {
{ "native", syscallnames, SYS_MAXSYSCALL },
{ "linux", linux_syscallnames, LINUX_SYS_MAXSYSCALL },
{ "svr4", svr4_syscallnames, SVR4_SYS_MAXSYSCALL },
- { NULL, NULL, NULL }
+ { NULL, NULL, 0 }
};
struct emulation *current;
diff --git a/usr.bin/mail/cmd1.c b/usr.bin/mail/cmd1.c
index c9a411330b1..bcc29f63fc8 100644
--- a/usr.bin/mail/cmd1.c
+++ b/usr.bin/mail/cmd1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd1.c,v 1.28 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: cmd1.c,v 1.29 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: cmd1.c,v 1.9 1997/07/09 05:29:48 mikel Exp $ */
/*-
@@ -166,7 +166,7 @@ from(void *v)
int *msgvec = v;
int *ip;
- for (ip = msgvec; *ip != NULL; ip++)
+ for (ip = msgvec; *ip != 0; ip++)
printhead(*ip);
if (--ip >= msgvec)
dot = &message[*ip - 1];
diff --git a/usr.bin/mail/cmd2.c b/usr.bin/mail/cmd2.c
index eb2c921440a..40944212eef 100644
--- a/usr.bin/mail/cmd2.c
+++ b/usr.bin/mail/cmd2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd2.c,v 1.17 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: cmd2.c,v 1.18 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: cmd2.c,v 1.7 1997/05/17 19:55:10 pk Exp $ */
/*
@@ -53,7 +53,7 @@ next(void *v)
int *msgvec = v;
int *ip, *ip2, list[2], mdot;
- if (*msgvec != NULL) {
+ if (*msgvec != 0) {
/*
* If some messages were supplied, find the
* first applicable one following dot using
@@ -65,7 +65,7 @@ next(void *v)
* Find the first message in the supplied
* message list which follows dot.
*/
- for (ip = msgvec; *ip != NULL; ip++)
+ for (ip = msgvec; *ip != 0; ip++)
if (*ip > mdot)
break;
if (*ip == 0)
@@ -77,7 +77,7 @@ next(void *v)
dot = mp;
goto hitit;
}
- if (*ip2 != NULL)
+ if (*ip2 != 0)
ip2++;
if (*ip2 == 0)
ip2 = msgvec;
@@ -110,7 +110,7 @@ hitit:
* Print dot.
*/
list[0] = dot - &message[0] + 1;
- list[1] = NULL;
+ list[1] = 0;
return(type(list));
}
@@ -158,7 +158,7 @@ save1(char *str, int mark, char *cmd, struct ignoretab *ignore)
printf("No messages to %s.\n", cmd);
return(1);
}
- msgvec[1] = NULL;
+ msgvec[1] = 0;
}
if (f && getmsglist(str, msgvec, 0) < 0)
return(1);
@@ -271,7 +271,7 @@ deltype(void *v)
list[0] = dot - &message[0] + 1;
if (list[0] > lastdot) {
touch(dot);
- list[1] = NULL;
+ list[1] = 0;
return(type(list));
}
puts("At EOF");
@@ -291,18 +291,18 @@ delm(int *msgvec)
struct message *mp;
int *ip, last;
- last = NULL;
- for (ip = msgvec; *ip != NULL; ip++) {
+ last = 0;
+ for (ip = msgvec; *ip != 0; ip++) {
mp = &message[*ip - 1];
touch(mp);
mp->m_flag |= MDELETED|MTOUCH;
mp->m_flag &= ~(MPRESERVE|MSAVED|MBOX);
last = *ip;
}
- if (last != NULL) {
+ if (last != 0) {
dot = &message[last-1];
last = first(0, MDELETED);
- if (last != NULL) {
+ if (last != 0) {
dot = &message[last-1];
return(0);
}
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c
index bce23b10939..905144b839d 100644
--- a/usr.bin/mail/cmd3.c
+++ b/usr.bin/mail/cmd3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd3.c,v 1.24 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: cmd3.c,v 1.25 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: cmd3.c,v 1.8 1997/07/09 05:29:49 mikel Exp $ */
/*
@@ -276,7 +276,7 @@ marknew(void *v)
int *msgvec = v;
int *ip;
- for (ip = msgvec; *ip != NULL; ip++) {
+ for (ip = msgvec; *ip != 0; ip++) {
dot = &message[*ip-1];
dot->m_flag &= ~(MBOX|MREAD|MTOUCH);
dot->m_flag |= MNEW|MSTATUS;
@@ -299,7 +299,7 @@ preserve(void *v)
puts("Cannot \"preserve\" in edit mode");
return(1);
}
- for (ip = msgvec; *ip != NULL; ip++) {
+ for (ip = msgvec; *ip != 0; ip++) {
mesg = *ip;
mp = &message[mesg-1];
mp->m_flag |= MPRESERVE;
@@ -318,7 +318,7 @@ unread(void *v)
int *msgvec = v;
int *ip;
- for (ip = msgvec; *ip != NULL; ip++) {
+ for (ip = msgvec; *ip != 0; ip++) {
dot = &message[*ip-1];
dot->m_flag &= ~(MREAD|MTOUCH);
dot->m_flag |= MSTATUS;
@@ -336,7 +336,7 @@ messize(void *v)
struct message *mp;
int *ip, mesg;
- for (ip = msgvec; *ip != NULL; ip++) {
+ for (ip = msgvec; *ip != 0; ip++) {
mesg = *ip;
mp = &message[mesg-1];
printf("%d: %d/%d\n", mesg, mp->m_lines, mp->m_size);
diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c
index 63672bce745..204dc3606da 100644
--- a/usr.bin/mail/collect.c
+++ b/usr.bin/mail/collect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: collect.c,v 1.32 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: collect.c,v 1.33 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */
/*
@@ -523,7 +523,7 @@ forward(char *ms, FILE *fp, char *fn, int f)
puts("No appropriate messages");
return(0);
}
- msgvec[1] = NULL;
+ msgvec[1] = 0;
}
if (tolower(f) == 'f')
tabst = NULL;
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c
index 712d79df5b5..7690ce78330 100644
--- a/usr.bin/mail/lex.c
+++ b/usr.bin/mail/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.33 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: lex.c,v 1.34 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: lex.c,v 1.10 1997/05/17 19:55:13 pk Exp $ */
/*
@@ -397,7 +397,7 @@ execute(char *linebuf, int contxt)
if (c == 0) {
*msgvec = first(com->c_msgflag,
com->c_msgmask);
- msgvec[1] = NULL;
+ msgvec[1] = 0;
}
if (*msgvec == 0) {
puts("No applicable messages");
@@ -427,7 +427,7 @@ execute(char *linebuf, int contxt)
if (c == 0) {
*msgvec = first(com->c_msgflag,
com->c_msgmask);
- msgvec[1] = NULL;
+ msgvec[1] = 0;
}
if (*msgvec == 0) {
puts("No applicable messages");
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 81eecc8eed6..4be3aa93dc4 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.87 2009/08/04 03:45:47 tedu Exp $ */
+/* $OpenBSD: route.c,v 1.88 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */
/*
@@ -102,7 +102,7 @@ routepr(u_long rtree, u_long mtree, u_long af2idx, u_long rtbl_id_max,
printf("Routing tables\n");
- if (rtree == NULL || af2idx == NULL) {
+ if (rtree == 0 || af2idx == 0) {
printf("rt_tables: symbol not in namelist\n");
return;
}
@@ -138,7 +138,7 @@ routepr(u_long rtree, u_long mtree, u_long af2idx, u_long rtbl_id_max,
}
continue;
}
- if (af2rtafidx[i] == NULL)
+ if (af2rtafidx[i] == 0)
/* no table for this AF */
continue;
if ((rnh = rt_tables[af2rtafidx[i]]) == NULL)
diff --git a/usr.bin/oldrdist/expand.c b/usr.bin/oldrdist/expand.c
index 7b0cf800d65..e07ecd0e036 100644
--- a/usr.bin/oldrdist/expand.c
+++ b/usr.bin/oldrdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.12 2009/10/27 23:59:41 deraadt Exp $ */
+/* $OpenBSD: expand.c,v 1.13 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -169,7 +169,7 @@ expstr(s)
savec = *tail;
*tail = '\0';
}
- tp = lookup(cp, NULL, 0);
+ tp = lookup(cp, LOOKUP, 0);
if (savec != '\0')
*tail = savec;
if (tp != NULL) {
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c
index db67323e3c6..2a2c0b5e674 100644
--- a/usr.bin/rpcgen/rpc_hout.c
+++ b/usr.bin/rpcgen/rpc_hout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_hout.c,v 1.19 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: rpc_hout.c,v 1.20 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: rpc_hout.c,v 1.4 1995/06/11 21:49:55 pk Exp $ */
/*
@@ -163,7 +163,7 @@ pargdef(def)
}
fprintf(fout, "};\n");
fprintf(fout, "typedef struct %s %s;\n", name, name);
- pxdrfuncdecl(name, NULL);
+ pxdrfuncdecl(name, 0);
fprintf(fout, "\n");
}
}
diff --git a/usr.bin/tmux/cmd-display-message.c b/usr.bin/tmux/cmd-display-message.c
index 2576dfe6055..03de7d1e0cf 100644
--- a/usr.bin/tmux/cmd-display-message.c
+++ b/usr.bin/tmux/cmd-display-message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-display-message.c,v 1.9 2011/03/29 19:30:16 nicm Exp $ */
+/* $OpenBSD: cmd-display-message.c,v 1.10 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -52,7 +52,7 @@ cmd_display_message_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((c = cmd_find_client(ctx, args_get(args, 'c'))) == NULL)
return (-1);
- if (args_has(args, 't') != NULL) {
+ if (args_has(args, 't') != 0) {
wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp);
if (wl == NULL)
return (-1);
diff --git a/usr.bin/xstr/xstr.c b/usr.bin/xstr/xstr.c
index 758f633055e..a04250fb09d 100644
--- a/usr.bin/xstr/xstr.c
+++ b/usr.bin/xstr/xstr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xstr.c,v 1.16 2009/10/27 23:59:50 deraadt Exp $ */
+/* $OpenBSD: xstr.c,v 1.17 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: xstr.c,v 1.5 1994/12/24 16:57:59 cgd Exp $ */
/*
@@ -311,7 +311,7 @@ fgetNUL(char *obuf, int rmdr, FILE *file)
while (--rmdr > 0 && (c = xgetc(file)) != 0 && c != EOF)
*buf++ = c;
*buf++ = 0;
- return ((feof(file) || ferror(file)) ? NULL : 1);
+ return ((feof(file) || ferror(file)) ? 0 : 1);
}
int
diff --git a/usr.sbin/config/ukcutil.c b/usr.sbin/config/ukcutil.c
index 7d0d5299f0d..50b356f477d 100644
--- a/usr.sbin/config/ukcutil.c
+++ b/usr.sbin/config/ukcutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukcutil.c,v 1.18 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: ukcutil.c,v 1.19 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -1358,7 +1358,7 @@ process_history(int len, char *buf)
c = buf;
- while (*c != NULL) {
+ while (*c != '\0') {
switch (*c) {
case 'a':
c++;
@@ -1432,12 +1432,12 @@ process_history(int len, char *buf)
ukc_mod_kernel = 1;
break;
case 'q':
- while (*c != NULL)
+ while (*c != '\0')
c++;
break;
default:
printf("unknown command %c\n", *c);
- while (*c != NULL && *c != '\n')
+ while (*c != '\0' && *c != '\n')
c++;
break;
}
diff --git a/usr.sbin/dvmrpd/rde_mfc.c b/usr.sbin/dvmrpd/rde_mfc.c
index 5ecc54167d0..8391aba05d8 100644
--- a/usr.sbin/dvmrpd/rde_mfc.c
+++ b/usr.sbin/dvmrpd/rde_mfc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_mfc.c,v 1.8 2009/09/22 16:24:21 michele Exp $ */
+/* $OpenBSD: rde_mfc.c,v 1.9 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -372,8 +372,7 @@ mfc_check_members(struct rt_node *rn, struct iface *iface)
RB_FOREACH(mn, mfc_tree, &mfc) {
if (mn->origin.s_addr == rn->prefix.s_addr) {
- if (rde_group_list_find(iface, mn->group)
- != NULL)
+ if (rde_group_list_find(iface, mn->group) != 0)
return (1);
}
}
diff --git a/usr.sbin/httpd/src/modules/keynote/mod_keynote.c b/usr.sbin/httpd/src/modules/keynote/mod_keynote.c
index 7f33f430a9a..cd382992a0d 100644
--- a/usr.sbin/httpd/src/modules/keynote/mod_keynote.c
+++ b/usr.sbin/httpd/src/modules/keynote/mod_keynote.c
@@ -148,7 +148,7 @@ add_action_attributes(int sessid, request_rec *r)
add_action_attribute(sessid, "protocol", r->protocol, r);
add_action_attribute(sessid, "filename", r->filename, r);
- tt = time((time_t) NULL);
+ tt = time((time_t *) NULL);
strftime (mytimeofday, 14, "%Y%m%d%H%M%S", gmtime (&tt));
add_action_attribute(sessid, "GMTTimeOfDay", mytimeofday, r);
@@ -269,7 +269,7 @@ keynote_get_valid_times(request_rec *r, X509 *cert, char *before, size_t beforel
if (((tm = X509_get_notBefore(cert)) == NULL) ||
(tm->type != V_ASN1_UTCTIME && tm->type != V_ASN1_GENERALIZEDTIME)) {
- tt = time((time_t) NULL);
+ tt = time((time_t *) NULL);
strftime(before, 14, "%G%m%d%H%M%S", localtime(&tt));
*timecomp = "LocalTimeOfDay";
} else {
@@ -638,7 +638,7 @@ check_keynote_assertions(request_rec *r)
/* Missing or self-signed, deny them */
issuer = X509_get_issuer_name(cert);
subject = X509_get_subject_name(cert);
- if (!issuer || !subject || X509_name_cmp(issuer, subject) == NULL) {
+ if (!issuer || !subject || X509_name_cmp(issuer, subject) == 0) {
rval = FORBIDDEN;
goto done;
}
diff --git a/usr.sbin/ppp/ppp/physical.h b/usr.sbin/ppp/ppp/physical.h
index 75a30e8e624..878cc434afe 100644
--- a/usr.sbin/ppp/ppp/physical.h
+++ b/usr.sbin/ppp/ppp/physical.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $OpenBSD: physical.h,v 1.20 2002/05/16 01:13:39 brian Exp $
+ * $OpenBSD: physical.h,v 1.21 2011/04/06 11:36:26 miod Exp $
*
*/
@@ -114,7 +114,7 @@ struct physical {
};
#define field2phys(fp, name) \
- ((struct physical *)((char *)fp - (int)(&((struct physical *)0)->name)))
+ ((struct physical *)((char *)fp - (int)(&((struct physical *)NULL)->name)))
#define link2physical(l) \
((l)->type == PHYSICAL_LINK ? field2phys(l, link) : NULL)
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c
index 406219a5a33..ec0918e1f84 100644
--- a/usr.sbin/procmap/procmap.c
+++ b/usr.sbin/procmap/procmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procmap.c,v 1.35 2011/04/05 18:51:26 thib Exp $ */
+/* $OpenBSD: procmap.c,v 1.36 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */
/*
@@ -88,7 +88,7 @@ struct cache_entry {
LIST_HEAD(cache_head, cache_entry) lcache;
void *uvm_vnodeops, *uvm_deviceops, *aobj_pager;
-u_long nchash_addr, kernel_map_addr;
+u_long kernel_map_addr;
int debug, verbose;
int print_all, print_map, print_maps, print_solaris, print_ddb, print_amap;
int rwx = VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE;
@@ -164,8 +164,6 @@ struct nlist nl[] = {
#define NL_AOBJ_PAGER 3
{ "_kernel_map" },
#define NL_KERNEL_MAP 4
- { "_nchash" },
-#define NL_NCHASH 5
{ NULL }
};
@@ -523,8 +521,6 @@ load_symbols(kvm_t *kd)
uvm_deviceops = (void*)nl[NL_UVM_DEVICEOPS].n_value;
aobj_pager = (void*)nl[NL_AOBJ_PAGER].n_value;
- nchash_addr = nl[NL_NCHASH].n_value;
-
_KDEREF(kd, nl[NL_MAXSSIZ].n_value, &maxssiz,
sizeof(maxssiz));
_KDEREF(kd, nl[NL_KERNEL_MAP].n_value, &kernel_map_addr,
@@ -604,7 +600,7 @@ dump_vm_map_entry(kvm_t *kd, struct kbit *vmspace,
KDEREF(kd, amap);
}
- A(vfs) = NULL;
+ A(vfs) = 0;
if (P(vp) != NULL && D(vp, vnode)->v_mount != NULL) {
P(vfs) = D(vp, vnode)->v_mount;
diff --git a/usr.sbin/rtadvd/rrenum.c b/usr.sbin/rtadvd/rrenum.c
index cd0caf439f6..96165ba1a0d 100644
--- a/usr.sbin/rtadvd/rrenum.c
+++ b/usr.sbin/rtadvd/rrenum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrenum.c,v 1.13 2010/06/26 18:26:21 guenther Exp $ */
+/* $OpenBSD: rrenum.c,v 1.14 2011/04/06 11:36:26 miod Exp $ */
/* $KAME: rrenum.c,v 1.11 2002/05/21 14:26:55 itojun Exp $ */
/*
@@ -237,7 +237,7 @@ do_pco(struct icmp6_router_renum *rr, int len, struct rr_pco_match *rpm)
int ifindex = 0;
struct in6_rrenumreq irr;
- if ((rr_pco_check(len, rpm) != NULL))
+ if ((rr_pco_check(len, rpm) != 0))
return 1;
if (s == -1 && (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c
index 2e850d68c58..62bd7aa58ae 100644
--- a/usr.sbin/user/user.c
+++ b/usr.sbin/user/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.78 2010/07/26 10:55:17 miod Exp $ */
+/* $OpenBSD: user.c,v 1.79 2011/04/06 11:36:26 miod Exp $ */
/* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */
/*
@@ -924,7 +924,7 @@ scantime(time_t *tp, char *s)
*tp = mktime(&tm);
} else if (strptime(s, "%B %d %Y", &tm) != NULL) {
*tp = mktime(&tm);
- } else if (isdigit((unsigned char) s[0]) != NULL) {
+ } else if (isdigit((unsigned char) s[0]) != 0) {
*tp = atoi(s);
} else {
return 0;
diff --git a/usr.sbin/ypldap/aldap.c b/usr.sbin/ypldap/aldap.c
index 266b038f29d..75b2d9d831b 100644
--- a/usr.sbin/ypldap/aldap.c
+++ b/usr.sbin/ypldap/aldap.c
@@ -1,5 +1,5 @@
-/* $Id: aldap.c,v 1.26 2010/07/21 17:32:12 martinh Exp $ */
-/* $OpenBSD: aldap.c,v 1.26 2010/07/21 17:32:12 martinh Exp $ */
+/* $Id: aldap.c,v 1.27 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: aldap.c,v 1.27 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
@@ -1063,7 +1063,7 @@ utoa(char *u)
char *str;
/* calculate the length to allocate */
- for (len = 0, i = 0; u[i] != NULL; ) {
+ for (len = 0, i = 0; u[i] != '\0'; ) {
if ((u[i] & 0xF0) == 0xF0)
i += 4;
else if ((u[i] & 0xE0) == 0xE0)
@@ -1079,7 +1079,7 @@ utoa(char *u)
return NULL;
/* copy the ASCII characters to the newly allocated string */
- for (i = 0, j = 0; u[i] != NULL; j++) {
+ for (i = 0, j = 0; u[i] != '\0'; j++) {
if ((u[i] & 0xF0) == 0xF0) {
str[j] = '?';
i += 4;
diff --git a/usr.sbin/ypserv/revnetgroup/revnetgroup.c b/usr.sbin/ypserv/revnetgroup/revnetgroup.c
index 97113a9ac78..e7b64d0e1db 100644
--- a/usr.sbin/ypserv/revnetgroup/revnetgroup.c
+++ b/usr.sbin/ypserv/revnetgroup/revnetgroup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: revnetgroup.c,v 1.9 2009/10/27 23:59:58 deraadt Exp $ */
+/* $OpenBSD: revnetgroup.c,v 1.10 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 1995
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -142,7 +142,7 @@ main(int argc, char *argv[])
gcur = gtable[i];
while (gcur) {
__setnetgrent(gcur->key);
- while (__getnetgrent(&host, &user, &domain) != NULL) {
+ while (__getnetgrent(&host, &user, &domain) != 0) {
if (hosts) {
if (!(host && !strcmp(host,"-"))) {
mstore(mtable,