X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=x5%2Fkhatus.c;h=bdf2c1d79ba1a9f88b2e99de83443bb179c9ec5d;hb=c5d1af8c1b6a539f164fd3509645823b84af3646;hp=3897b870bf65b1a6fa2f4cfa480503c2938b30f5;hpb=fabb877142fbe4686ef7fcaf7fa0f4f92c1fe254;p=khatus.git diff --git a/x5/khatus.c b/x5/khatus.c index 3897b87..bdf2c1d 100644 --- a/x5/khatus.c +++ b/x5/khatus.c @@ -1,15 +1,16 @@ -#include -#include #include #include -#include #include #include #include +#include #include #include #include +#include + +#include #define debug(args...) {fprintf(stderr, "[debug] " args);} #define info( args...) {fprintf(stderr, "[info] " args);} @@ -228,7 +229,7 @@ opts_parse_any(Config *cfg, int argc, char *argv[], int i) } void -opts_parse(Config *cfg, int argc, char *argv[], int i) +opts_parse(Config *cfg, int argc, char *argv[]) { opts_parse_any(cfg, argc, argv, 1); @@ -268,7 +269,7 @@ void read_all(Config *cfg, char *buf) { fd_set fds; - int maxfd; + int maxfd = -1; int ready; struct stat st; @@ -313,11 +314,11 @@ main(int argc, char *argv[]) int prefix = 0; char *buf; Config *cfg = &defaults; - Display *display; + Display *display = NULL; argv0 = argv[0]; - opts_parse(cfg, argc, argv, 1); + opts_parse(cfg, argc, argv); debug("argv0 = %s\n", argv0); config_print(cfg); if (cfg->files == NULL)