summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Egorov <egorov@linux.com>2015-03-19 23:42:34 +0600
committerIgnacio Casal Quinteiro <icq@gnome.org>2015-10-31 20:19:29 +0100
commit15a8885758a5e6b4d7d03d7cacd89a212bbf9847 (patch)
treea7f28866466aac3a0b6b7d670702dad09d4af7eb
parentb6fe636277bff9f21b6e3f2c640a17114f9e723f (diff)
downloadlibcroco-15a8885758a5e6b4d7d03d7cacd89a212bbf9847.tar.gz
Fix typo in logical condition
TYPE_SELECTOR equals to 2, so condition (cur_sel->type_mask | TYPE_SELECTOR) will always be true. We should increase c only if we encounter a selector. Issue detected by Cppcheck and MSVS (see https://bugzilla.gnome.org/show_bug.cgi?id=507484) Signed-off-by: Boris Egorov <egorov@linux.com>
-rw-r--r--src/cr-simple-sel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cr-simple-sel.c b/src/cr-simple-sel.c
index 0add0ea..ac90685 100644
--- a/src/cr-simple-sel.c
+++ b/src/cr-simple-sel.c
@@ -254,7 +254,7 @@ cr_simple_sel_compute_specificity (CRSimpleSel * a_this)
g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
for (cur_sel = a_this; cur_sel; cur_sel = cur_sel->next) {
- if (cur_sel->type_mask | TYPE_SELECTOR) {
+ if (cur_sel->type_mask & TYPE_SELECTOR) {
c++; /*hmmh, is this a new language ? */
} else if (!cur_sel->name
|| !cur_sel->name->stryng