diff options
author | Jonathan Bauer | 2019-06-12 14:35:10 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-06-12 14:35:10 +0200 |
commit | dfbb07bede54a75655c6014142d23c6b92c0c014 (patch) | |
tree | d97d346fa0601fc767ba821e0ff0cf0ffe43cb85 | |
parent | always reset input form when user idles (diff) | |
download | slxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.tar.gz slxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.tar.xz slxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.zip |
fix missing return and removed unneeded check
-rw-r--r-- | src/x11util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/x11util.cpp b/src/x11util.cpp index ce9192c..20c3665 100644 --- a/src/x11util.cpp +++ b/src/x11util.cpp @@ -87,6 +87,7 @@ unsigned long getIdleTime(Display *dpy) ssi = XScreenSaverAllocInfo(); if (ssi == nullptr) { fprintf(stderr, "Couldn't allocate screen saver info\n"); + return 0; } if (!XScreenSaverQueryInfo(dpy, DefaultRootWindow(dpy), ssi)) { @@ -94,7 +95,6 @@ unsigned long getIdleTime(Display *dpy) return 0; } unsigned long idleTime = ssi->idle; - if (ssi != nullptr) - XFree(ssi); + XFree(ssi); return idleTime; } |