diff options
author | Joursoir <chat@joursoir.net> | 2022-08-27 12:22:00 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-08-27 12:38:48 +0300 |
commit | 9660f20af1f041f59cf23dd805df7ab6c7d34792 (patch) | |
tree | 6f60dd639e9d385464b4f9f7de16976c04b9bfec /src | |
parent | 3ecbcec9412e14f3cd71e04e86ee06a51617890c (diff) | |
download | lock-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
Diffstat (limited to 'src')
-rw-r--r-- | src/r-x11.c | 7 |
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); |