From d363ff334d796c7f3df834d928a10d88ed758454 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 5 May 2011 23:52:18 +0000 Subject: 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 --- runtime/libprofile/GCDAProfiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c index 8ab4227..5af94be 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) { -- cgit v1.1