get rid of set_status() since it's only used once

This commit is contained in:
raiz 2016-12-27 19:56:11 +03:00
parent 3c8717f4e0
commit 13772c3979
1 changed files with 3 additions and 10 deletions

View File

@ -69,7 +69,6 @@ static char *vol_perc(const char *card);
static char *wifi_perc(const char *iface); static char *wifi_perc(const char *iface);
static char *wifi_essid(const char *iface); static char *wifi_essid(const char *iface);
static char *kernel_release(void); static char *kernel_release(void);
static void set_status(const char *str);
static void sighandler(const int signo); static void sighandler(const int signo);
static void usage(void); static void usage(void);
@ -747,13 +746,6 @@ kernel_release(void)
return smprintf("%s", udata.release); return smprintf("%s", udata.release);
} }
static void
set_status(const char *str)
{
XStoreName(dpy, DefaultRootWindow(dpy), str);
XSync(dpy, False);
}
static void static void
sighandler(const int signo) sighandler(const int signo)
{ {
@ -832,7 +824,8 @@ main(int argc, char *argv[])
} }
if (!oflag) { if (!oflag) {
set_status(status_string); XStoreName(dpy, DefaultRootWindow(dpy), status_string);
XSync(dpy, False);
} else { } else {
printf("%s\n", status_string); printf("%s\n", status_string);
} }
@ -851,7 +844,7 @@ main(int argc, char *argv[])
} }
if (!oflag) { if (!oflag) {
set_status(NULL); XStoreName(dpy, DefaultRootWindow(dpy), NULL);
XCloseDisplay(dpy); XCloseDisplay(dpy);
} }