summaryrefslogtreecommitdiff
path: root/cpu_ref
diff options
context:
space:
mode:
authorMichael Butler <butlermichael@google.com>2017-04-26 18:25:16 -0700
committerMichael Butler <butlermichael@google.com>2017-04-27 21:01:23 +0000
commit7305bb3390497843a6a530f68cc07be88adc7c52 (patch)
tree39cb361e1418ad608acdec12bfadb4cd30fc1807 /cpu_ref
parent2a1576ff5147497b18f9f62b97a6c4fa40035e93 (diff)
downloadrs-7305bb3390497843a6a530f68cc07be88adc7c52.tar.gz
Append null terminator to fullPath variable and change sizeof(type) to
sizeof(*name) for clarity. Fixes minor issues addressed in aosp/380576 Bug: 32511607 Test: mma, cts, vts Change-Id: I8f2eca4bcc8c93671668a542dc6117df58979b56
Diffstat (limited to 'cpu_ref')
-rw-r--r--cpu_ref/rsCpuCore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu_ref/rsCpuCore.cpp b/cpu_ref/rsCpuCore.cpp
index f4f9c4c9..7fcaef9f 100644
--- a/cpu_ref/rsCpuCore.cpp
+++ b/cpu_ref/rsCpuCore.cpp
@@ -483,7 +483,7 @@ static const int kFormatInBytesMax = 16;
// ": " + 2 digits per byte + 1 separator between bytes + "..." + null
typedef char FormatBuf[2 + kFormatInBytesMax*2 + (kFormatInBytesMax - 1) + 3 + 1];
static const char *format_bytes(FormatBuf *outBuf, const uint8_t *inBuf, const int inBytes) {
- strlcpy(*outBuf, ": ", sizeof(FormatBuf));
+ strlcpy(*outBuf, ": ", sizeof(*outBuf));
int pos = 2;
const int lim = std::min(kFormatInBytesMax, inBytes);
for (int i = 0; i < lim; ++i) {