[asterisk-bugs] [JIRA] (ASTERISK-21772) Redundant if statement

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


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

Rusty Newton updated ASTERISK-21772:
------------------------------------

    Summary: Redundant if statement  (was: Code reading revealed useless if statement)
    
> Redundant if statement
> ----------------------
>
>                 Key: ASTERISK-21772
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21772
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>    Affects Versions: SVN
>            Reporter: Peter J. Philipp
>            Assignee: 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