From 3d12b6d1d940d40c1298ae03e519c8ac4a9a1407 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 7 Sep 2014 19:27:30 +0000 Subject: more style nits --- search.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'search.c') diff --git a/search.c b/search.c index 4b4f457..adb2f60 100644 --- a/search.c +++ b/search.c @@ -194,13 +194,13 @@ search_match_path(struct menu_q *menuq, struct menu_q *resultq, char *search, in static void search_match_path_exec(struct menu_q *menuq, struct menu_q *resultq, char *search) { - return (search_match_path(menuq, resultq, search, PATH_EXEC)); + return(search_match_path(menuq, resultq, search, PATH_EXEC)); } void search_match_path_any(struct menu_q *menuq, struct menu_q *resultq, char *search) { - return (search_match_path(menuq, resultq, search, PATH_ANY)); + return(search_match_path(menuq, resultq, search, PATH_ANY)); } void @@ -254,13 +254,13 @@ strsubmatch(char *sub, char *str, int zeroidx) unsigned int n, flen; if (sub == NULL || str == NULL) - return (0); + return(0); len = strlen(str); sublen = strlen(sub); if (sublen > len) - return (0); + return(0); if (!zeroidx) flen = len - sublen; @@ -269,7 +269,7 @@ strsubmatch(char *sub, char *str, int zeroidx) for (n = 0; n <= flen; n++) if (strncasecmp(sub, str + n, sublen) == 0) - return (1); + return(1); - return (0); + return(0); } -- cgit 1.4.1 From 4b6dc963983906e9a2866565da003840037dff23 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 15 Sep 2014 13:00:49 +0000 Subject: use similiar style for client flags --- client.c | 8 ++++---- search.c | 2 +- xevents.c | 2 +- xutil.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'search.c') diff --git a/client.c b/client.c index f1dfce5..6545c4e 100644 --- a/client.c +++ b/client.c @@ -187,7 +187,7 @@ client_setactive(struct client_ctx *cc) XInstallColormap(X_Dpy, cc->colormap); if ((cc->flags & CLIENT_INPUT) || - ((cc->flags & CLIENT_WM_TAKE_FOCUS) == 0)) { + (!(cc->flags & CLIENT_WM_TAKE_FOCUS))) { XSetInputFocus(X_Dpy, cc->win, RevertToPointerRoot, CurrentTime); } @@ -260,7 +260,7 @@ client_fullscreen(struct client_ctx *cc) !(cc->flags & CLIENT_FULLSCREEN)) return; - if ((cc->flags & CLIENT_FULLSCREEN)) { + if (cc->flags & CLIENT_FULLSCREEN) { cc->bwidth = Conf.bwidth; cc->geom = cc->fullgeom; cc->flags &= ~(CLIENT_FULLSCREEN | CLIENT_FREEZE); @@ -297,12 +297,12 @@ client_maximize(struct client_ctx *cc) goto resize; } - if ((cc->flags & CLIENT_VMAXIMIZED) == 0) { + if (!(cc->flags & CLIENT_VMAXIMIZED)) { cc->savegeom.h = cc->geom.h; cc->savegeom.y = cc->geom.y; } - if ((cc->flags & CLIENT_HMAXIMIZED) == 0) { + if (!(cc->flags & CLIENT_HMAXIMIZED)) { cc->savegeom.w = cc->geom.w; cc->savegeom.x = cc->geom.x; } diff --git a/search.c b/search.c index adb2f60..f0b22ce 100644 --- a/search.c +++ b/search.c @@ -102,7 +102,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) tier++; /* Clients that are hidden get ranked one up. */ - if (cc->flags & CLIENT_HIDDEN && tier > 0) + if ((cc->flags & CLIENT_HIDDEN) && (tier > 0)) tier--; assert(tier < nitems(tierp)); diff --git a/xevents.c b/xevents.c index 4520d3c..e294c61 100644 --- a/xevents.c +++ b/xevents.c @@ -82,7 +82,7 @@ xev_handle_maprequest(XEvent *ee) if ((cc = client_find(e->window)) == NULL) cc = client_init(e->window, NULL); - if ((cc != NULL) && ((cc->flags & CLIENT_IGNORE) == 0)) + if ((cc != NULL) && (!(cc->flags & CLIENT_IGNORE))) client_ptrwarp(cc); } diff --git a/xutil.c b/xutil.c index 199119f..0e3d9e4 100644 --- a/xutil.c +++ b/xutil.c @@ -393,7 +393,7 @@ xu_ewmh_handle_net_wm_state_msg(struct client_ctx *cc, int action, continue; switch (action) { case _NET_WM_STATE_ADD: - if ((cc->flags & handlers[i].property) == 0) + if (!(cc->flags & handlers[i].property)) handlers[i].toggle(cc); break; case _NET_WM_STATE_REMOVE: -- cgit 1.4.1