summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-10-26 13:13:21 +0100
committerAdam Jackson <ajax@redhat.com>2008-11-05 14:41:11 -0500
commitb0c2d009852972f1b085ab5ce2271692dface27f (patch)
tree56822f99ed0e3527d20b53837c7d7a0bab5b2a8b
parenta311fdc04013c678eb506458d6a5d3376f107bf7 (diff)
xfree86: fix compiler warnings in DoModalias()
The precedence of == is higher than that of &, so that code was probably buggy. xf86Init.c: In function 'DoModalias': xf86Init.c:300: warning: suggest parentheses around comparison in operand of & xf86Init.c:304: warning: suggest parentheses around comparison in operand of & xf86Init.c:308: warning: suggest parentheses around comparison in operand of & (cherry picked from commit ffaaa1a198a77eb6800c08d4613ee1cc0b068ba0)
-rw-r--r--hw/xfree86/common/xf86Init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 8b41d8189..fc50cafc7 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -307,15 +307,15 @@ DoModalias()
ErrorF("sd%08X", match->subdevice_id);
/* Class */
- if (match->device_class_mask >> 16 & 0xFF == 0xFF)
+ if ((match->device_class_mask >> 16 & 0xFF) == 0xFF)
ErrorF("bc%02X", match->device_class >> 16 & 0xFF);
else
ErrorF("bc*");
- if (match->device_class_mask >> 8 & 0xFF == 0xFF)
+ if ((match->device_class_mask >> 8 & 0xFF) == 0xFF)
ErrorF("sc%02X", match->device_class >> 8 & 0xFF);
else
ErrorF("sc*");
- if (match->device_class_mask & 0xFF == 0xFF)
+ if ((match->device_class_mask & 0xFF) == 0xFF)
ErrorF("i%02X*", match->device_class & 0xFF);
else
ErrorF("i*");