From 28f57528b11552ec6936c7b6865228578bda8ce5 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Sat, 5 Dec 2020 03:24:41 +0530 Subject: [PATCH] Improved xgetrootname --- xgetrootname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xgetrootname.c b/xgetrootname.c index e04154c..7189ac9 100644 --- a/xgetrootname.c +++ b/xgetrootname.c @@ -4,8 +4,8 @@ int main() { - Display *dpy; char *name; + Display *dpy; if (!(dpy = XOpenDisplay(NULL))) { fputs("Error: could not open display.\n", stderr); @@ -14,7 +14,7 @@ main() if (XFetchName(dpy, DefaultRootWindow(dpy), &name) && name[0]) printf("%s\n", name); else - puts("No name has been set for the root window."); + fputs("No name has been set for the root window.\n", stderr); XFree(name); XCloseDisplay(dpy); return 0;