Eliminate trailing whitespace from lines
[browser-switch] / config-ui / browser-switchboard-config.c
index befc113..01d301f 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * browser-switchboard-config.c -- command-line configuration utility for 
+ * browser-switchboard-config.c -- command-line configuration utility for
  * Browser Switchboard
  * 
  * Copyright (C) 2009-2010 Steven Luo
  * Browser Switchboard
  * 
  * Copyright (C) 2009-2010 Steven Luo
@@ -49,7 +49,8 @@ static int get_config_value(char *name) {
                i = optinfo - swb_config_options;
                switch (optinfo->type) {
                  case SWB_CONFIG_OPT_STRING:
                i = optinfo - swb_config_options;
                switch (optinfo->type) {
                  case SWB_CONFIG_OPT_STRING:
-                       printf("%s\n", *(char **)cfg.entries[i]);
+                       if (*(char **)cfg.entries[i])
+                               printf("%s\n", *(char **)cfg.entries[i]);
                        break;
                  case SWB_CONFIG_OPT_INT:
                        printf("%d\n", *(int *)cfg.entries[i]);
                        break;
                  case SWB_CONFIG_OPT_INT:
                        printf("%d\n", *(int *)cfg.entries[i]);
@@ -147,7 +148,7 @@ int main(int argc, char **argv) {
        int opt, done = 0;
        int set = 0;
        char *selected_opt = NULL;
        int opt, done = 0;
        int set = 0;
        char *selected_opt = NULL;
-       
+
        while (!done && (opt = getopt(argc, argv, "hsbcmo:")) != -1) {
                switch (opt) {
                  case 'h':
        while (!done && (opt = getopt(argc, argv, "hsbcmo:")) != -1) {
                switch (opt) {
                  case 'h':