[PATCH 1/2] KMS: Fix output properties logic error.
Michel Dänzer
michel at daenzer.net
Thu May 12 01:07:25 PDT 2011
From: Michel Dänzer <daenzer at vmware.com>
Pointed out by clang:
../../src/drmmode_display.c:1023:30: error: use of logical && with constant operand; switch to bitwise & or remove constant [-Werror,-Wconstant-logical-operand]
if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
^ ~~~~~~~~~~~~~~~~~~
---
src/drmmode_display.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7873d57..afa4c26 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1020,7 +1020,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int *num_dv
for (i = 0; i < koutput->count_props; i++) {
props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
- if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
+ if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
if (!strcmp(props->name, "DPMS")) {
drmmode_output->dpms_enum_id = koutput->props[i];
drmModeFreeProperty(props);
--
1.7.5.1
More information about the xorg-driver-ati
mailing list