summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Bauer2019-06-12 14:35:10 +0200
committerJonathan Bauer2019-06-12 14:35:10 +0200
commitdfbb07bede54a75655c6014142d23c6b92c0c014 (patch)
treed97d346fa0601fc767ba821e0ff0cf0ffe43cb85 /src
parentalways reset input form when user idles (diff)
downloadslxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.tar.gz
slxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.tar.xz
slxgreeter-dfbb07bede54a75655c6014142d23c6b92c0c014.zip
fix missing return and removed unneeded check
Diffstat (limited to 'src')
-rw-r--r--src/x11util.cpp4
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;
}