diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2015-12-04 00:40:07 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2015-12-04 00:40:07 +0000 |
commit | d6487b23a9c0caa059898e0a497393fb824966aa (patch) | |
tree | f96c7d50f5223ba375af7334b8f27ea0aa55df94 | |
parent | 2e2469d9d9591850f84d1058e2fce45f43d4d610 (diff) | |
download | bcm5719-llvm-d6487b23a9c0caa059898e0a497393fb824966aa.tar.gz bcm5719-llvm-d6487b23a9c0caa059898e0a497393fb824966aa.zip |
Don't shadow a variable in the outer scope. Use canonical form of the
array size idiom.
llvm-svn: 254673
-rw-r--r-- | compiler-rt/lib/profile/InstrProfilingWriter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingWriter.c b/compiler-rt/lib/profile/InstrProfilingWriter.c index a931d45623d..0147b312d9b 100644 --- a/compiler-rt/lib/profile/InstrProfilingWriter.c +++ b/compiler-rt/lib/profile/InstrProfilingWriter.c @@ -59,11 +59,11 @@ LLVM_LIBRARY_VISIBILITY int llvmWriteProfDataImpl( {CountersBegin, sizeof(uint64_t), CountersSize}, {NamesBegin, sizeof(char), NamesSize}, {Zeroes, sizeof(char), Padding}}; - if (Writer(IOVec, sizeof(IOVec) / sizeof(ProfDataIOVec), &WriterCtx)) + if (Writer(IOVec, sizeof(IOVec) / sizeof(*IOVec), &WriterCtx)) return -1; if (ValueDataBegin) { - ProfDataIOVec IOVec[1] = {{ValueDataBegin, sizeof(char), ValueDataSize}}; - if (Writer(IOVec, 1, &WriterCtx)) + ProfDataIOVec IOVec2[] = {{ValueDataBegin, sizeof(char), ValueDataSize}}; + if (Writer(IOVec2, sizeof(IOVec2) / sizeof(*IOVec2), &WriterCtx)) return -1; } return 0; |