diff options
author | Michael Adam <obnox@samba.org> | 2016-11-23 11:12:42 +0100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2016-11-23 13:00:21 +0100 |
commit | fa7e40b92460c094e64cb175dfb297436fe483eb (patch) | |
tree | 908671ce94859af96303ccc95bfc25e13ae51e1c /source3 | |
parent | 21ae8871580fbcacfb0091fb83ba328448850b4d (diff) | |
download | samba-fa7e40b92460c094e64cb175dfb297436fe483eb.tar.gz |
param: use early return in lp_canonicalize_parameter_with_value()
This reduces the indentation and streamlines the flow.
View with "git show -w" to see it's mostly indentation change.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index b5b9190e19f..6ac7b693ce2 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1713,16 +1713,17 @@ bool lp_canonicalize_parameter_with_value(const char *parm_name, /* parametric option */ *canon_parm = parm_name; *canon_val = val; - } else { - *canon_parm = parm_table[num].label; - if (inverse) { - if (!lp_invert_boolean(val, canon_val)) { - *canon_val = NULL; - return false; - } - } else { - *canon_val = val; + return true; + } + + *canon_parm = parm_table[num].label; + if (inverse) { + if (!lp_invert_boolean(val, canon_val)) { + *canon_val = NULL; + return false; } + } else { + *canon_val = val; } return true; |