Browse Source

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.
Marius Melzer 4 months ago
parent
commit
de8c46aee4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/inet/resolv.c

+ 1 - 1
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 */;