summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew F. Davis2019-06-11 16:12:14 -0500
committerAndrew F. Davis2019-06-28 10:32:54 -0500
commitbd3c633485b9a895acda7b42d311a4d31529f208 (patch)
tree63a3d26e10fd4afa2c1885e533ec7a4792a3dc29
parent3f46d1c811b28db42bd32a31a115770469c7c2cb (diff)
downloadhardware-ti-am65x-bd3c633485b9a895acda7b42d311a4d31529f208.tar.gz
hardware-ti-am65x-bd3c633485b9a895acda7b42d311a4d31529f208.tar.xz
hardware-ti-am65x-bd3c633485b9a895acda7b42d311a4d31529f208.zip
libhwcomposer: Let C++ style zero value initialization clear hwc_device_t
Signed-off-by: Andrew F. Davis <afd@ti.com>
-rw-r--r--libhwcomposer/hwc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 14eda8a..888108b 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -680,8 +680,7 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic
680 if (strcmp(name, HWC_HARDWARE_COMPOSER)) 680 if (strcmp(name, HWC_HARDWARE_COMPOSER))
681 return -EINVAL; 681 return -EINVAL;
682 682
683 omap_hwc_device_t* hwc_dev = new omap_hwc_device_t; 683 omap_hwc_device_t* hwc_dev = new omap_hwc_device_t();
684 memset(hwc_dev, 0, sizeof(*hwc_dev));
685 684
686 /* Open DRM device */ 685 /* Open DRM device */
687 hwc_dev->card = new kms::Card(); 686 hwc_dev->card = new kms::Card();