From 3993e2dd0645064fafc4f6206e90390524d99b57 Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Thu, 20 Sep 2018 12:55:58 +0930 Subject: that isn't how you handle errors in x11 --- binstatus.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/binstatus.c b/binstatus.c index ca384f1..615b584 100644 --- a/binstatus.c +++ b/binstatus.c @@ -81,20 +81,7 @@ main(int argc, char *argv[]) { gettime(time); formatstring(status, time); - int res = XStoreName(dsp, DefaultRootWindow(dsp), status); - if (res == BadAlloc) - { - fprintf(stderr, "X: unable to allocate source" - " or server memory.\n"); - exitflag = EXIT_FAILURE; - break; - } - else if (res == BadWindow) - { - fprintf(stderr, "X: No default window found\n"); - exitflag = EXIT_FAILURE; - break; - } + XStoreName(dsp, DefaultRootWindow(dsp), status); XFlush(dsp); sleep(1); } -- cgit v1.2.3