diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-10-30 22:06:33 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-10-30 22:06:33 -0700 |
commit | 937f09dd3532a2033e9bf159bed842bfd1f3ad2a (patch) | |
tree | 71de2efdc3813016f08f30b9d7516ee93d6c2da1 /src/rmd_error.c | |
parent | a031634bd64c7f30c4ace5ca06a5a47600b42f47 (diff) |
*: more minor cleanups
No need for fflush(stderr) when it's already unbuffered by default.
According to setvbuf(3):
Normally all files are block buffered. If a stream refers
to a terminal (as stdout normally does), it is line
buffered. The standard error stream stderr is always
unbuffered by default.
Diffstat (limited to 'src/rmd_error.c')
-rw-r--r-- | src/rmd_error.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rmd_error.c b/src/rmd_error.c index ba95198..aaef20a 100644 --- a/src/rmd_error.c +++ b/src/rmd_error.c @@ -41,17 +41,14 @@ int rmdErrorHandler(Display *dpy, XErrorEvent *e) XGetErrorText(dpy, e->error_code, error_desc, sizeof(error_desc)); fprintf(stderr, "X Error: %s\n", error_desc); - fflush(stderr); - if ((e->error_code==BadWindow)&&(e->request_code==X_GetWindowAttributes)) { + if ((e->error_code == BadWindow) && (e->request_code == X_GetWindowAttributes)) { fprintf(stderr, "BadWindow on XGetWindowAttributes.\nIgnoring...\n"); - fflush(stderr); return 0; } - if ((e->error_code==BadAccess)&&(e->request_code==X_GrabKey)) { + if ((e->error_code == BadAccess) && (e->request_code == X_GrabKey)) { fprintf(stderr, "Bad Access on XGrabKey.\n" "Shortcut already assigned.\n"); - fflush(stderr); return 0; } |