From de8c46aee404020fb78a6a283b5be6fbee4f3931 Mon Sep 17 00:00:00 2001 From: Marius Melzer Date: Wed, 20 Dec 2023 13:36:18 +0100 Subject: Fix -Wnon-literal-null-conversion clang warning Clang warns that the NULL character literal '\0' is used as a pointer value. Change this to 0 in order to avoid the warning. --- libc/inet/resolv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index cda3b399a..2f627ca08 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1778,7 +1778,7 @@ int __read_etc_hosts_r( found: result_buf->h_name = *(result_buf->h_aliases++); result_buf->h_addr_list = (char**)(buf + HALISTOFF); - *(result_buf->h_addr_list + 1) = '\0'; + *(result_buf->h_addr_list + 1) = 0; h_addr0 = (struct in_addr*)(buf + INADDROFF); result_buf->h_addr = (char*)h_addr0; if (0) /* nothing */; -- cgit v1.2.3