From de9c1e498c9083787fed20b89b77dce7f67d668e Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 3 Dec 2016 17:17:42 +0000 Subject: MFC r297790: r297790 (by pfg): libc: replace 0 with NULL for pointers. While here also cleanup some surrounding code; particularly drop some malloc() casts. Found with devel/coccinelle. --- lib/libc/gen/tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/gen/tls.c') diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 466f957..8ac4040 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -284,7 +284,7 @@ _init_tls() while (*sp++ != 0) ; aux = (Elf_Auxinfo *) sp; - phdr = 0; + phdr = NULL; phent = phnum = 0; for (auxp = aux; auxp->a_type != AT_NULL; auxp++) { switch (auxp->a_type) { @@ -301,7 +301,7 @@ _init_tls() break; } } - if (phdr == 0 || phent != sizeof(Elf_Phdr) || phnum == 0) + if (phdr == NULL || phent != sizeof(Elf_Phdr) || phnum == 0) return; for (i = 0; (unsigned) i < phnum; i++) { -- cgit v1.1