diff options
author | Sasha Levitskiy <sanek@google.com> | 2014-04-21 17:20:17 -0700 |
---|---|---|
committer | Sasha Levitskiy <sanek@google.com> | 2014-04-23 11:54:24 -0700 |
commit | a82f456c387cb6ff6c5aab7c930a7a61c36ed8ba (patch) | |
tree | b7a2eeac4ed159ee5f6129d9cbeabc69a1c72148 /modules/camera/Metadata.cpp | |
parent | 449ebdd70fa8df58b03a9bd38deed2e53cb512a0 (diff) | |
download | hardware_libhardware-a82f456c387cb6ff6c5aab7c930a7a61c36ed8ba.zip hardware_libhardware-a82f456c387cb6ff6c5aab7c930a7a61c36ed8ba.tar.gz hardware_libhardware-a82f456c387cb6ff6c5aab7c930a7a61c36ed8ba.tar.bz2 |
Camera: HAL: 64-bit warning fixit.
Change-Id: Iecc3e1846fbf63c51952d115e1f167cf32135b18
Signed-off-by: Sasha Levitskiy <sanek@google.com>
Diffstat (limited to 'modules/camera/Metadata.cpp')
-rw-r--r-- | modules/camera/Metadata.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/camera/Metadata.cpp b/modules/camera/Metadata.cpp index 72314d5..f195534 100644 --- a/modules/camera/Metadata.cpp +++ b/modules/camera/Metadata.cpp @@ -143,18 +143,20 @@ int Metadata::add(uint32_t tag, int count, const void *tag_data) // Double new dimensions to minimize future reallocations tmp = allocate_camera_metadata(entry_capacity * 2, data_capacity * 2); if (tmp == NULL) { - ALOGE("%s: Failed to allocate new metadata with %d entries, %d data", + ALOGE("%s: Failed to allocate new metadata with %zu entries, %zu data", __func__, entry_capacity, data_capacity); return -ENOMEM; } // Append the current metadata to the new (empty) metadata - if (res = append_camera_metadata(tmp, mData)) { + res = append_camera_metadata(tmp, mData); + if (res) { ALOGE("%s: Failed to append old metadata %p to new %p", __func__, mData, tmp); return res; } // Add the remaining new item - if (res = add_camera_metadata_entry(tmp, tag, tag_data, count)) { + res = add_camera_metadata_entry(tmp, tag, tag_data, count); + if (res) { ALOGE("%s: Failed to add new entry (%d, %p, %d) to metadata %p", __func__, tag, tag_data, count, tmp); return res; |