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 | 987ed36c4391ce8b5b2dd9ba62e570981eb929bf (patch) | |
tree | 184fe009e5edf3c194723f0bd126e6abbe9fbd2e /lib/profile | |
parent | 960c490e7348c7f47a96510aae357d2d40aa859b (diff) |
Don't shadow a variable in the outer scope. Use canonical form of the
array size idiom.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-rw-r--r-- | lib/profile/InstrProfilingWriter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/profile/InstrProfilingWriter.c b/lib/profile/InstrProfilingWriter.c index a931d4562..0147b312d 100644 --- a/lib/profile/InstrProfilingWriter.c +++ b/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; |