From 0a5d929801b03be5d4d3a70f74767de5c259e17c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 13 Nov 2007 22:41:23 +0100 Subject: [PATCH] rename is_client_tag_from_rules() to is_tag_match_rules() and fix a potential error in it --- rules.c | 4 ++-- rules.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules.c b/rules.c index 42c20bb1..303419d8 100644 --- a/rules.c +++ b/rules.c @@ -65,11 +65,11 @@ get_client_screen_from_rules(Client *c, Rule *rules) } Bool -is_client_tag_from_rules(Client *c, Tag *t, Rule *r) +is_tag_match_rules(Tag *t, Rule *r) { regmatch_t tmp; - if(!regexec(r->tagregex, t->name, 1, &tmp, 0)) + if(r->tagregex && !regexec(r->tagregex, t->name, 1, &tmp, 0)) return True; return False; diff --git a/rules.h b/rules.h index 116acb49..da160672 100644 --- a/rules.h +++ b/rules.h @@ -28,7 +28,7 @@ Bool client_match_rule(Client *, Rule *); int get_client_screen_from_rules(Client *, Rule *); -Bool is_client_tag_from_rules(Client *, Tag *, Rule *); +Bool is_tag_match_rules(Tag *, Rule *); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99