diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-10 19:33:58 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-10 19:33:58 +0000 |
commit | 6e91d78151e10ed31c475cafe6a1e1f11950c1d9 (patch) | |
tree | 6796a0cd32cea8fd5591b7f2c6d10ae7f153ccb9 /lib/libc/resolv/res_init.c | |
parent | 1485828b0840fbefcb7789ae54df9650c16fda61 (diff) | |
download | FreeBSD-src-6e91d78151e10ed31c475cafe6a1e1f11950c1d9.zip FreeBSD-src-6e91d78151e10ed31c475cafe6a1e1f11950c1d9.tar.gz |
libc: replace 0 with NULL for pointers.
While here also cleanup some surrounding code; particularly
drop some malloc() casts.
Found with devel/coccinelle.
Reviewed by: bde (previous version - all new bugs are mine)
Diffstat (limited to 'lib/libc/resolv/res_init.c')
-rw-r--r-- | lib/libc/resolv/res_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index 8832342..9856322 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -315,7 +315,7 @@ __res_vinit(res_state statp, int preinit) { while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n') cp++; *cp = '\0'; - *pp++ = 0; + *pp++ = NULL; } #define MATCH(line, name) \ @@ -391,7 +391,7 @@ __res_vinit(res_state statp, int preinit) { while (*cp != '\0' && *cp != ' ' && *cp != '\t') cp++; *cp = '\0'; - *pp++ = 0; + *pp++ = NULL; havesearch = 1; continue; } |