summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a14c3dd)
raw | patch | inline | side by side (parent: a14c3dd)
author | Ville Syrjälä <ville.syrjala at linux.intel.com> | |
Thu, 2 Feb 2012 19:53:43 +0000 (14:53 -0500) | ||
committer | Jerome Glisse <jglisse@redhat.com> | |
Thu, 2 Feb 2012 19:53:43 +0000 (14:53 -0500) |
work. sizeof() treats such parameters as pointers.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
xf86drmMode.c | patch | blob | history |
diff --git a/xf86drmMode.c b/xf86drmMode.c
index 473e7341bcd6b228186110e6de4e7ac6d4da3991..c809c44acc2db318978fd2f92dd8062fa7153818 100644 (file)
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
f.height = height;
f.pixel_format = pixel_format;
f.flags = flags;
- memcpy(f.handles, bo_handles, sizeof(bo_handles));
- memcpy(f.pitches, pitches, sizeof(pitches));
- memcpy(f.offsets, offsets, sizeof(offsets));
+ memcpy(f.handles, bo_handles, 4 * sizeof(bo_handles[0]));
+ memcpy(f.pitches, pitches, 4 * sizeof(pitches[0]));
+ memcpy(f.offsets, offsets, 4 * sizeof(offsets[0]));
if ((ret = DRM_IOCTL(fd, DRM_IOCTL_MODE_ADDFB2, &f)))
return ret;