summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2015-05-18 15:51:54 -0700
committerChih-Hung Hsieh <chh@google.com>2015-05-18 15:51:54 -0700
commit8eddd88568fe4da0ca0ceab5072bc488827f01b5 (patch)
tree4e8e7b28e765cced1d955f942e30d207cb99ad33 /camera
parentd45d75d7c19811c5afe9b115c7282f9aa4e1ee4d (diff)
downloadframeworks_av-8eddd88568fe4da0ca0ceab5072bc488827f01b5.zip
frameworks_av-8eddd88568fe4da0ca0ceab5072bc488827f01b5.tar.gz
frameworks_av-8eddd88568fe4da0ca0ceab5072bc488827f01b5.tar.bz2
Use memset to initialize dynamic array.
clang/llvm rejects int32_t events[len] = {};. BUG: 21269094 Change-Id: I0257bfbb72f1b49913baba0164d5a3a7976c452d
Diffstat (limited to 'camera')
-rw-r--r--camera/ICameraService.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/camera/ICameraService.cpp b/camera/ICameraService.cpp
index a02dbe2..0071e70 100644
--- a/camera/ICameraService.cpp
+++ b/camera/ICameraService.cpp
@@ -494,7 +494,8 @@ status_t BnCameraService::onTransact(
__FUNCTION__, len);
return FAILED_TRANSACTION;
}
- int32_t events[len] = {};
+ int32_t events[len];
+ memset(events, 0, sizeof(int32_t) * len);
status_t status = data.read(events, sizeof(int32_t) * len);
if (status != NO_ERROR) {
ALOGE("%s: Received poorly formatted binder request: notifySystemEvent.",