[asterisk-bugs] [JIRA] (ASTERISK-21848) Redundant if statement in dns.c

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu May 30 11:23:05 CDT 2013


Rusty Newton created ASTERISK-21848:
---------------------------------------

             Summary: Redundant if statement in dns.c
                 Key: ASTERISK-21848
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21848
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
    Affects Versions: SVN
            Reporter: Peter J. Philipp
            Assignee: Rusty Newton
            Severity: Minor


In code reading dns.c I see this:

                if (len < 0) {
                        ast_log(LOG_WARNING, "Strange result size\n");
                        return -1;
                }
                if (len < 0) {
                        ast_log(LOG_WARNING, "Length exceeds frame\n");
                        return -1;
                }

1. the second if will always be false if it's called
2. adds useless check, since first already covers it

I don't see a patch upload field here so here goes the patch:


[edit: removed inline patch]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list