]> git.tue.mpg.de Git - adu.git/commitdiff
com_select(): Minor cleanup.
authorAndre Noll <maan@systemlinux.org>
Mon, 23 Jun 2008 11:48:54 +0000 (13:48 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 23 Jun 2008 11:48:54 +0000 (13:48 +0200)
Move params struct into the if clause where it is used.

select.c

index 226c16422061eee09667be8177ed0f869a2586b6..0c73a587585543c4690753a3f774abee68de2ad3 100644 (file)
--- a/select.c
+++ b/select.c
@@ -590,15 +590,15 @@ out:
 int com_select(void)
 {
        int ret;
-       struct select_cmdline_parser_params params = {
-               .override = 1,
-               .initialize = 1,
-               .check_required = 1,
-               .check_ambiguity = 1,
-               .print_errors = 1
-       };
-
        if (conf.select_options_given) {
+               struct select_cmdline_parser_params params = {
+                       .override = 1,
+                       .initialize = 1,
+                       .check_required = 1,
+                       .check_ambiguity = 1,
+                       .print_errors = 1
+               };
+
                if (select_cmdline_parser_string_ext(conf.select_options_arg,
                        &select_conf, "select", &params))
                        return -E_SYNTAX;