From f79a477cc47b06ad19b8d4f808f4ed0f1943db85 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 28 Jul 2012 01:34:23 +0200 Subject: [PATCH] Small spelling/cleanup fixes for UTILITIES/x11idle.c --- UTILITIES/x11idle.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/UTILITIES/x11idle.c b/UTILITIES/x11idle.c index 8d544686d..5299d3bd4 100644 --- a/UTILITIES/x11idle.c +++ b/UTILITIES/x11idle.c @@ -8,7 +8,6 @@ * path */ main() { - Status querry = 0; XScreenSaverInfo *info = XScreenSaverAllocInfo(); //open the display specified by the DISPLAY environment variable Display *display = XOpenDisplay(0); @@ -18,15 +17,12 @@ main() { return -1; } - //X11 is running, retrieve and print idle time - querry = XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); - - if (querry == 0) { - return -1; + //X11 is running, try to retrieve info + if (XScreenSaverQueryInfo(display, DefaultRootWindow(display), info) == 0) { + return -1; } - //idle time was retrieved successfully, print it + //info was retrieved successfully, print idle time printf("%u\n", info->idle); return 0; } -