summaryrefslogtreecommitdiffstats
path: root/minui/graphics_adf.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2016-11-10 02:12:43 +0100
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-11-10 02:12:43 +0100
commitf78a6cb5060298c22a12b1117deb8d1d12d8e129 (patch)
treed94a38c2109de3c09b9ae632cc9c4a92eabf382d /minui/graphics_adf.cpp
parentMerge "Touch blocks in care_map in update_verifier" am: 3605a072bc -s ours am: 96c3c32b66 am: b86af2577c (diff)
parentUse static_cast to cast pointers returned by malloc/calloc/realloc/mmap. (diff)
downloadandroid_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar.gz
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar.bz2
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar.lz
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar.xz
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.tar.zst
android_bootable_recovery-f78a6cb5060298c22a12b1117deb8d1d12d8e129.zip
Diffstat (limited to '')
-rw-r--r--minui/graphics_adf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/minui/graphics_adf.cpp b/minui/graphics_adf.cpp
index 3c3541094..9e262b044 100644
--- a/minui/graphics_adf.cpp
+++ b/minui/graphics_adf.cpp
@@ -68,9 +68,9 @@ static int adf_surface_init(adf_pdata *pdata, drm_mode_modeinfo *mode, adf_surfa
surf->base.row_bytes = surf->pitch;
surf->base.pixel_bytes = (pdata->format == DRM_FORMAT_RGB565) ? 2 : 4;
- surf->base.data = reinterpret_cast<uint8_t*>(mmap(NULL,
- surf->pitch * surf->base.height, PROT_WRITE,
- MAP_SHARED, surf->fd, surf->offset));
+ surf->base.data = static_cast<uint8_t*>(mmap(NULL,
+ surf->pitch * surf->base.height, PROT_WRITE,
+ MAP_SHARED, surf->fd, surf->offset));
if (surf->base.data == MAP_FAILED) {
close(surf->fd);
return -errno;
@@ -259,7 +259,7 @@ static void adf_exit(minui_backend *backend)
minui_backend *open_adf()
{
- adf_pdata* pdata = reinterpret_cast<adf_pdata*>(calloc(1, sizeof(*pdata)));
+ adf_pdata* pdata = static_cast<adf_pdata*>(calloc(1, sizeof(*pdata)));
if (!pdata) {
perror("allocating adf backend failed");
return NULL;