[libcroco] Fix typo in logical condition



commit 15a8885758a5e6b4d7d03d7cacd89a212bbf9847
Author: Boris Egorov <egorov linux com>
Date:   Thu Mar 19 23:42:34 2015 +0600

    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>

 src/cr-simple-sel.c |    2 +-
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]