Summary: | ASTERISK-21772: Redundant if statement in dns.c | ||
Reporter: | Peter J. Philipp (pjphilipp) | Labels: | |
Date Opened: | 2013-05-09 03:14:26 | Date Closed: | 2013-07-13 21:07:24 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Core/General |
Versions: | SVN | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | 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] | ||
Comments: | By: Alec Davis (alecdavis) 2013-05-09 03:37:36.369-0500 Under 'More Actions' you'll find 'Attach Files'. By: Michael L. Young (elguero) 2013-05-09 09:52:30.234-0500 Peter, Thanks for your contribution. Please read up on how to submit patches: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-PatchandCodesubmission Once you sign a contributor's license, you can attach your patch just like Alec pointed out. |