diff options
author | Michel Dänzer <daenzer@vmware.com> | 2011-05-13 09:10:02 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2011-05-13 09:10:02 +0200 |
commit | 3b893d81982c9381393c92625e308541e0071b05 (patch) | |
tree | 10bb2df2a8a0541cc457606e2beeaa33c9730c03 | |
parent | f83d58cf5b33686139067f8f898b8e566ba5c253 (diff) |
KMS: Fix output properties logic error.
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)) {
^ ~~~~~~~~~~~~~~~~~~
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | 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 7873d572..afa4c268 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); |