summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoegeun Kwon <hoegeun.kwon@samsung.com>2017-07-03 20:08:16 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-04-25 17:58:34 +0900
commit80539880b0f4c55e2e9c86d4a241472d4ec697a6 (patch)
tree6f19ad12a56c9d7f9efd10f8bec13d278f795dbe
parente1affa7e94c1ec02da1022da6e9b6d12ae88a815 (diff)
downloadlibdrm-80539880b0f4c55e2e9c86d4a241472d4ec697a6.tar.gz
libdrm-80539880b0f4c55e2e9c86d4a241472d4ec697a6.tar.bz2
libdrm-80539880b0f4c55e2e9c86d4a241472d4ec697a6.zip
ipptest: Fix to use the sizeof operator correctly
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 c31e578f..ed31a260 100644
--- a/tests/ipptest/fimc.c
+++ b/tests/ipptest/fimc.c
@@ -149,7 +149,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) \
@@ -412,7 +412,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) {
@@ -512,7 +512,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;
@@ -538,7 +538,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;
@@ -569,10 +569,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;
@@ -1100,7 +1100,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);
}