summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-12-11 14:46:51 +1000
committerDave Airlie <airlied@linux.ie>2007-12-11 14:46:51 +1000
commit3b6786e3e6523b1ceca3645ea4c6081f170d2134 (patch)
tree79f84063a455489dd15517f80abe8fe1dda4aa3e /libdrm
parent9d064966d8495038921d0e731c0bfca0cd58d244 (diff)
modesetting: add dpms property and initial settable property ioctl
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 03bd15f1..7e2683ea 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -421,10 +421,10 @@ drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
if (prop.count_values)
prop.values_ptr = VOID2U64(drmMalloc(prop.count_values * sizeof(uint64_t)));
- if (prop.count_enum_blobs & (prop.flags & DRM_MODE_PROP_ENUM))
+ if (prop.count_enum_blobs && (prop.flags & DRM_MODE_PROP_ENUM))
prop.enum_blob_ptr = VOID2U64(drmMalloc(prop.count_enum_blobs * sizeof(struct drm_mode_property_enum)));
- if (prop.count_enum_blobs & (prop.flags & DRM_MODE_PROP_BLOB)) {
+ if (prop.count_enum_blobs && (prop.flags & DRM_MODE_PROP_BLOB)) {
prop.values_ptr = VOID2U64(drmMalloc(prop.count_enum_blobs * sizeof(uint32_t)));
prop.enum_blob_ptr = VOID2U64(drmMalloc(prop.count_enum_blobs * sizeof(uint32_t)));
}