aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2022-08-27 12:22:00 +0300
committerJoursoir <chat@joursoir.net>2022-08-27 12:38:48 +0300
commit9660f20af1f041f59cf23dd805df7ab6c7d34792 (patch)
tree6f60dd639e9d385464b4f9f7de16976c04b9bfec
parent3ecbcec9412e14f3cd71e04e86ee06a51617890c (diff)
downloadlock-password-9660f20af1f041f59cf23dd805df7ab6c7d34792.tar.gz
lock-password-9660f20af1f041f59cf23dd805df7ab6c7d34792.tar.bz2
lock-password-9660f20af1f041f59cf23dd805df7ab6c7d34792.zip
r-x11: replace errprint_*() with print_error()
This is one of the steps on the way to get rid of errprint_*() macros and handle errors by yourself. For more context see other patches under the same topic specified below. TOPIC=drop_errprint
-rw-r--r--src/r-x11.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/r-x11.c b/src/r-x11.c
index e869d3b..3094b71 100644
--- a/src/r-x11.c
+++ b/src/r-x11.c
@@ -23,6 +23,7 @@
#include <X11/Xlib.h>
#include "constants.h"
+#include "output.h"
static Atom X_utf8;
@@ -75,8 +76,10 @@ int run_clipboard(const char *data)
XSelectionRequestEvent *sev;
dpy = XOpenDisplay(NULL); // means use env $DISPLAY
- if(!dpy)
- errprint_r(1, "Open X display failed\n");
+ if(!dpy) {
+ print_error("Error: Open X display failed\n");
+ return 1;
+ }
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);