getdata: fix if else return statements

If something is true, and it returns using else is pointless.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-11-09 21:39:43 +00:00
parent 629796cce7
commit 72a41d8086

View file

@ -196,15 +196,13 @@ int nth_field(int n, char *restrict dest, const char *restrict src)
/* dhcpd.conf interesting words */
static int is_interesting_config_clause(char const *restrict s)
{
if (strstr(s, "range")) {
if (strstr(s, "range"))
return 3;
} else if (strstr(s, "shared-network")) {
if (strstr(s, "shared-network"))
return 1;
} else if (strstr(s, "include")) {
if (strstr(s, "include"))
return 4;
} else {
return 0;
}
return 0;
}
/* FIXME: This spagetti monster function need to be rewrote at least ones. */