From: Andreas Schneider Date: Wed, 8 May 2019 15:03:54 +0000 (+0200) Subject: ctdb:common: Do not print NULL if we don't get a sockpath X-Git-Tag: tdb-1.4.1~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=830cb7e67568de5f3ce359cb6af3be8ab545c824;p=thirdparty%2Fsamba.git ctdb:common: Do not print NULL if we don't get a sockpath sock_socket_start_recv() might not fill sockpath if we return early. Found by GCC 9. Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c index e5e16f8af12..6298653f4ec 100644 --- a/ctdb/common/sock_daemon.c +++ b/ctdb/common/sock_daemon.c @@ -893,7 +893,7 @@ static void sock_daemon_run_socket_fail(struct tevent_req *subreq) subreq, struct tevent_req); struct sock_daemon_run_state *state = tevent_req_data( req, struct sock_daemon_run_state); - const char *sockpath = NULL; + const char *sockpath = "INVALID"; int ret = 0; bool status;