From 3b15da3ee25d639b1364d405e6202d763ecf11b0 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 16 Aug 2004 00:57:42 +0000 Subject: [PATCH] home made strlen in critical path, tweak git-svn-id: http://ltt.polymtl.ca/svn@784 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/tracefile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index 8a0d52ab..d490dd9f 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -1725,8 +1725,9 @@ int getFieldtypeSize(LttTracefile * t, LttEventType * evT, int offsetRoot, }else{//0: string /* Hope my implementation is faster than strlen (Mathieu) */ char *ptr=(char*)evD; - while(*ptr != '\0') ptr++; - size = ptr - (char*)evD + 1; //include end : '\0' + size = 1; + while(*ptr != '\0') { size++; ptr++; } + //size = ptr - (char*)evD + 1; //include end : '\0' } break; -- 2.34.1