mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
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:
parent
629796cce7
commit
72a41d8086
1 changed files with 4 additions and 6 deletions
|
|
@ -196,15 +196,13 @@ int nth_field(int n, char *restrict dest, const char *restrict src)
|
||||||
/* dhcpd.conf interesting words */
|
/* dhcpd.conf interesting words */
|
||||||
static int is_interesting_config_clause(char const *restrict s)
|
static int is_interesting_config_clause(char const *restrict s)
|
||||||
{
|
{
|
||||||
if (strstr(s, "range")) {
|
if (strstr(s, "range"))
|
||||||
return 3;
|
return 3;
|
||||||
} else if (strstr(s, "shared-network")) {
|
if (strstr(s, "shared-network"))
|
||||||
return 1;
|
return 1;
|
||||||
} else if (strstr(s, "include")) {
|
if (strstr(s, "include"))
|
||||||
return 4;
|
return 4;
|
||||||
} else {
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: This spagetti monster function need to be rewrote at least ones. */
|
/* FIXME: This spagetti monster function need to be rewrote at least ones. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue