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

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri May 31 10:37:05 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-21772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-21772:
-----------------------------------

    Component/s: Core/General
    
> Redundant if statement in dns.c
> -------------------------------
>
>                 Key: ASTERISK-21772
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21772
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/General
>    Affects Versions: SVN
>            Reporter: Peter J. Philipp
>            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