summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-05-05 23:52:18 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-05-05 23:52:18 +0000
commitd363ff334d796c7f3df834d928a10d88ed758454 (patch)
treee8282cd50bfa122d426159bcb04320aeb02a0d0a /runtime
parent97a12165812e67782749bc18d22ba1edcaf11a6c (diff)
downloadllvm-d363ff334d796c7f3df834d928a10d88ed758454.tar.gz
llvm-d363ff334d796c7f3df834d928a10d88ed758454.tar.bz2
llvm-d363ff334d796c7f3df834d928a10d88ed758454.tar.xz
The computation of string length is not that complicated. Fix it, again. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/libprofile/GCDAProfiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c
index 8ab4227600..5af94becfe 100644
--- a/runtime/libprofile/GCDAProfiling.c
+++ b/runtime/libprofile/GCDAProfiling.c
@@ -49,7 +49,7 @@ static void write_int64(uint64_t i) {
}
static uint32_t length_of_string(const char *s) {
- return (strlen(s) + 5) / 4;
+ return (strlen(s) / 4) + 1;
}
static void write_string(const char *s) {