From 15f425bdb887ac67c316941f3bee23462ec7e0a9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Oct 2009 09:12:40 +0000 Subject: no need to check for NULL pointers before dereferencing, as the pointers MUST be valid and they are dereferenced further down in the function unconditionally! --- ares/ares_parse_srv_reply.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ares/ares_parse_srv_reply.c b/ares/ares_parse_srv_reply.c index b0e15eb0f..3a17a5334 100644 --- a/ares/ares_parse_srv_reply.c +++ b/ares/ares_parse_srv_reply.c @@ -64,11 +64,10 @@ ares_parse_srv_reply (const unsigned char *abuf, int alen, struct ares_srv_reply *srv = NULL; /* Set *srv_out to NULL for all failure cases. */ - if (srv_out) - *srv_out = NULL; + *srv_out = NULL; + /* Same with *nsrvreply. */ - if (nsrvreply) - *nsrvreply = 0; + *nsrvreply = 0; /* Give up if abuf doesn't have room for a header. */ if (alen < HFIXEDSZ) -- cgit v1.2.3