summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoegeun Kwon <hoegeun.kwon@samsung.com>2017-07-03 20:08:16 +0900
committerHoegeun Kwon <hoegeun.kwon@samsung.com>2017-07-04 11:10:43 +0900
commitb9e4bbddd6bb3e426aaea2a71d2e51b057fb156e (patch)
treec543044e016aedf8cec7617f592105928bd93f7c
parent22d377c07cdf6c400cb0945c4bdf80fba2f20fae (diff)
downloadlibdrm-b9e4bbddd6bb3e426aaea2a71d2e51b057fb156e.tar.gz
libdrm-b9e4bbddd6bb3e426aaea2a71d2e51b057fb156e.tar.bz2
libdrm-b9e4bbddd6bb3e426aaea2a71d2e51b057fb156e.zip
ipptest: Fix to use the sizeof operator correctlysubmit/tizen/20170711.010212accepted/tizen/unified/20170711.180937
Fix the sizeof operator incorrect usage. Change-Id: I9d293c00bc20a2c1ae048c4d0564b75a98bcd860 Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
-rw-r--r--tests/ipptest/fimc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/ipptest/fimc.c b/tests/ipptest/fimc.c
index 38da0774..3a88ff2d 100644
--- a/tests/ipptest/fimc.c
+++ b/tests/ipptest/fimc.c
@@ -153,7 +153,7 @@ struct resources *get_resources(struct device *dev)
continue; \
} \
obj->props_info = malloc(obj->props->count_props * \
- sizeof *obj->props_info); \
+ sizeof(*obj->props_info)); \
if (!obj->props_info) \
continue; \
for (j = 0; j < obj->props->count_props; ++j) \
@@ -416,7 +416,7 @@ static int exynos_drm_ipp_set_property(int fd,
struct drm_exynos_sz dst_sz = {def_sz->hsize, def_sz->vsize};
int ret = 0;
- memset(property, 0x00, sizeof(struct drm_exynos_ipp_property));
+ memset(property, 0x00, sizeof(*property));
property->cmd = cmd;
switch(cmd) {
@@ -516,7 +516,7 @@ static int exynos_drm_ipp_queue_buf(int fd, struct drm_exynos_ipp_queue_buf *qbu
{
int ret = 0;
- memset(qbuf, 0x00, sizeof(struct drm_exynos_ipp_queue_buf));
+ memset(qbuf, 0x00, sizeof(*qbuf));
qbuf->ops_id = ops_id;
qbuf->buf_type = buf_type;
@@ -542,7 +542,7 @@ static int exynos_drm_ipp_cmd_ctrl(int fd, struct drm_exynos_ipp_cmd_ctrl *cmd_c
{
int ret = 0;
- memset(cmd_ctrl, 0x00, sizeof(struct drm_exynos_ipp_cmd_ctrl));
+ memset(cmd_ctrl, 0x00, sizeof(*cmd_ctrl));
cmd_ctrl->prop_id = prop_id;
cmd_ctrl->ctrl = ctrl;
@@ -573,10 +573,10 @@ int fimc_event_handler(struct drm_exynos_ipp_queue_buf *src_qbuf,
int src_buf_id, dst_buf_id;
static int bmp_idx = 0;
- len = read(fd, buffer, sizeof buffer);
+ len = read(fd, buffer, sizeof(buffer));
if (len == 0)
return 0;
- if (len < sizeof *e)
+ if (len < sizeof(*e))
return -1;
i = 0;
@@ -1104,7 +1104,7 @@ err_ipp_ctrl_close:
for (i = 0; i < MAX_BUF; i++) {
munmap(usr_addr[i], mmap[i].size);
- memset(&args, 0x00, sizeof(struct drm_gem_close));
+ memset(&args, 0x00, sizeof(args));
args.handle = gem[i].handle;
exynos_gem_close(fd, &args);
}