Misc fixes (coverity)

This commit is contained in:
Nicolas Williams
2016-11-20 17:43:07 -06:00
parent 6696920d9e
commit f38089257b
19 changed files with 105 additions and 81 deletions

View File

@@ -56,13 +56,11 @@
static int
init_port(const char *s, int fallback)
{
if (s) {
int tmp;
int tmp;
sscanf (s, "%d", &tmp);
return htons(tmp);
} else
return fallback;
if (s && sscanf(s, "%d", &tmp) == 1)
return htons(tmp);
return fallback;
}
struct send_via_plugin_s {