about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2016-10-24 18:57:12 +0000
committerokan <okan>2016-10-24 18:57:12 +0000
commit972e28d58cd3a2c4e3bd4cc746cd94f0056cd9a3 (patch)
tree647dc98e4cbd8684051d6f86268e75fc7662827d
parenteb43101591ca45754f4805dd1f7101c79a487ddb (diff)
downloadcwm-972e28d58cd3a2c4e3bd4cc746cd94f0056cd9a3.tar.gz
cwm-972e28d58cd3a2c4e3bd4cc746cd94f0056cd9a3.tar.xz
cwm-972e28d58cd3a2c4e3bd4cc746cd94f0056cd9a3.zip
Remove duplicate check that strsubmatch() already does; while here, fix a
comment.
-rw-r--r--search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c
index da05ae8..89d4911 100644
--- a/search.c
+++ b/search.c
@@ -57,7 +57,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
 		struct client_ctx *cc = (struct client_ctx *)mi->ctx;
 
 		/* Match on label. */
-		if ((cc->label) && strsubmatch(search, cc->label, 0))
+		if (strsubmatch(search, cc->label, 0))
 			tier = 0;
 
 		/* Match on window name history, from present to past. */
@@ -69,7 +69,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
 				}
 		}
 
-		/* Match on window class name. */
+		/* Match on window resource class. */
 		if ((tier < 0) && strsubmatch(search, cc->ch.res_class, 0))
 			tier = 3;