|
@@ -337,23 +337,20 @@ int main(int argc, char* argv[], char* env[])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if(hosts == NULL)
|
|
|
|
- {
|
|
|
|
- hosts = g_array_new(FALSE, TRUE, sizeof(char*));
|
|
|
|
- if (optind < argc)
|
|
|
|
- {
|
|
|
|
- while (optind < argc)
|
|
|
|
- {
|
|
|
|
- char *host = strdup(argv[optind++]);
|
|
|
|
- g_array_append_val(hosts, host);
|
|
|
|
- }
|
|
|
|
|
|
+ if (optind < argc) {
|
|
|
|
+ if (hosts == NULL) {
|
|
|
|
+ hosts = g_array_new(FALSE, TRUE, sizeof(char*));
|
|
}
|
|
}
|
|
- else
|
|
|
|
|
|
+ while (optind < argc)
|
|
{
|
|
{
|
|
- fprintf(stderr, "No hosts specified\n\n");
|
|
|
|
- usage(argv[0]);
|
|
|
|
|
|
+ char *host = strdup(argv[optind++]);
|
|
|
|
+ g_array_append_val(hosts, host);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (hosts == NULL) {
|
|
|
|
+ fprintf(stderr, "No hosts specified\n\n");
|
|
|
|
+ usage(argv[0]);
|
|
|
|
+ }
|
|
|
|
|
|
gtk_init(&argc, &argv);
|
|
gtk_init(&argc, &argv);
|
|
|
|
|