summaryrefslogtreecommitdiff
path: root/ares_parse_srv_reply.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-10-29 09:12:40 (GMT)
committerDaniel Stenberg <daniel@haxx.se>2009-10-29 09:12:40 (GMT)
commitdf2dc91fd4af74a11cb6697aa83e32517a92afce (patch)
treed9402371667dab9fb8bc84d507a425574818ee6f /ares_parse_srv_reply.c
parent2f84a750125893da38ceb6243a0660b57f24d888 (diff)
downloadc-ares-df2dc91fd4af74a11cb6697aa83e32517a92afce.zip
c-ares-df2dc91fd4af74a11cb6697aa83e32517a92afce.tar.gz
c-ares-df2dc91fd4af74a11cb6697aa83e32517a92afce.tar.bz2
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!
Diffstat (limited to 'ares_parse_srv_reply.c')
-rw-r--r--ares_parse_srv_reply.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ares_parse_srv_reply.c b/ares_parse_srv_reply.c
index b0e15eb..3a17a53 100644
--- a/ares_parse_srv_reply.c
+++ b/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)