@@ -76,7 +76,7 @@ static char **__get_options(GHashTable *kv, int is_global)
7676 for (c = 0 ; c < KSMBD_SHARE_CONF_MAX ; c ++ ) {
7777 const char * k = KSMBD_SHARE_CONF [c ], * v = NULL , * pre ;
7878
79- if (is_global && KSMBD_SHARE_CONF_IS_GLOBAL (c ) ||
79+ if (( is_global && KSMBD_SHARE_CONF_IS_GLOBAL (c ) ) ||
8080 KSMBD_SHARE_CONF_IS_BROKEN (c ))
8181 pre = "; " ;
8282 else
@@ -101,7 +101,7 @@ static void __load_conf(enum KSMBD_SHARE_CONF conf,
101101{
102102 char * option = options [conf ];
103103
104- if (step )
104+ if (step ) {
105105 if (cp_smbconf_eol (cp_ltrim (buf ))) {
106106 char * p = cp_ltrim (strchr (option , '=' ) + 1 );
107107 const char * fmt , * s ;
@@ -119,6 +119,7 @@ static void __load_conf(enum KSMBD_SHARE_CONF conf,
119119 } else {
120120 options [conf ] = g_strdup_printf ("%s%s" , option , buf );
121121 }
122+ }
122123
123124 printf ("\r" "\e[2K" "%s%s" "\e[6n" , option , buf );
124125
@@ -142,7 +143,7 @@ static enum KSMBD_SHARE_CONF __next_conf(enum KSMBD_SHARE_CONF conf,
142143 return __next_conf (conf - 1 , -1 , is_global , is_ready );
143144 }
144145
145- if (is_global && KSMBD_SHARE_CONF_IS_GLOBAL (conf ) ||
146+ if (( is_global && KSMBD_SHARE_CONF_IS_GLOBAL (conf ) ) ||
146147 KSMBD_SHARE_CONF_IS_BROKEN (conf ))
147148 return __next_conf (conf + step , step , is_global , is_ready );
148149
@@ -430,14 +431,14 @@ static int __prompt_options_stdin(char **options, int is_global)
430431 break ;
431432
432433 if (c == '\e' ||
433- c == '[' && ccode == '\e' ||
434- c == 'A' && ccode == '[' ||
435- c == 'B' && ccode == '[' ||
436- c >= '0' && c <= '9' && ccode == '[' ||
437- c >= '0' && c <= '9' && ccode >= '0' && ccode <= '9' ||
438- c == ';' && ccode >= '0' && ccode <= '9' ||
439- c >= '0' && c <= '9' && ccode == ';' ||
440- c == 'R' && ccode >= '0' && ccode <= '9' ) {
434+ ( c == '[' && ccode == '\e' ) ||
435+ ( c == 'A' && ccode == '[' ) ||
436+ ( c == 'B' && ccode == '[' ) ||
437+ ( c >= '0' && c <= '9' && ccode == '[' ) ||
438+ ( c >= '0' && c <= '9' && ccode >= '0' && ccode <= '9' ) ||
439+ ( c == ';' && ccode >= '0' && ccode <= '9' ) ||
440+ ( c >= '0' && c <= '9' && ccode == ';' ) ||
441+ ( c == 'R' && ccode >= '0' && ccode <= '9' ) ) {
441442 ccode = c ;
442443 continue ;
443444 }
0 commit comments