From d856535eddb84b18f55cbdcb0a6b0382cb643c20 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 29 Jul 2017 20:41:37 +0100 Subject: [PATCH] ircd: sendto_one_notice: avoid clang static analysis warning target_p->from can't be NULL, and if it is then get_id(..., target_p) dereferences it later in the function anyway --- ircd/send.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ircd/send.c b/ircd/send.c index 8c63ff64..a9698ade 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -346,17 +346,11 @@ sendto_one_prefix(struct Client *target_p, struct Client *source_p, void sendto_one_notice(struct Client *target_p, const char *pattern, ...) { - struct Client *dest_p; + struct Client *dest_p = target_p->from; va_list args; buf_head_t linebuf; char *to; - /* send remote if to->from non NULL */ - if(target_p->from != NULL) - dest_p = target_p->from; - else - dest_p = target_p; - if(IsIOError(dest_p)) return;