Skip to contentSkip to conversation

Remove redundant memclear

PATCH In review coypu 2 participants 2 messages Jun 30, 2017 – Jul 7, 2017

lore
Share & tools
lore

coypu

author
#0 lore raw

PATCH 1/1 Remove redundant memclear

drmMalloc will zero out the memory for us

---
 xf86drm.c | 2 --
 1 file changed, 2 deletions(-)
xf86drm.c +0 -2
index 2ac3f26..879f85b 100644
@@ -866,8 +866,6 @@ drmVersionPtr drmGetVersion(int fd)
     drmVersionPtr retval;
     drm_version_t *version = drmMalloc(sizeof(*version));
 
-    memclear(*version);
-
     if (drmIoctl(fd, DRM_IOCTL_VERSION, version)) {
         drmFreeKernelVersion(version);
         return NULL;
Signature · 6 lines
2.13.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 1 line · coypu

drmMalloc will zero out the memory for us

Good catch, thanks!
R-b and pushed.

In the future, can you provide your real name, and add a Signed-off-by: line?

Cheers,
Eric

Quoted 20 lines
---
 xf86drm.c | 2 --
 1 file changed, 2 deletions(-)
xf86drm.c +0 -2
index 2ac3f26..879f85b 100644
@@ -866,8 +866,6 @@ drmVersionPtr drmGetVersion(int fd)
     drmVersionPtr retval;
     drm_version_t *version = drmMalloc(sizeof(*version));
 
-    memclear(*version);
-
     if (drmIoctl(fd, DRM_IOCTL_VERSION, version)) {
         drmFreeKernelVersion(version);
         return NULL;
Signature · 1 line
2.13.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel