From e516db2c3088fffa1e6dfa1e1326e81288b9b5c4 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 27 Apr 2020 10:51:56 -0400 Subject: [PATCH] fix warning about possible null string closes #977 Change-Id: I4dec339289cb36402eef6bca39bb7af31ee17ef0 --- lib/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket.h b/lib/socket.h index e33e238b9..89b523dfb 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -119,7 +119,7 @@ INLINE char *sockaddr_print_buf(const sockaddr_t *a) { char *buf = get_thread_buf(); if (!a->family) { buf[0] = '\0'; - return 0; + return buf; } sockaddr_print(a, buf, THREAD_BUF_SIZE); return buf;