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 226c164..0c73a58 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;