From: compudj Date: Mon, 16 Aug 2004 00:57:42 +0000 (+0000) Subject: home made strlen in critical path, tweak X-Git-Tag: v0.12.20~2705 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=3b15da3ee25d639b1364d405e6202d763ecf11b0;p=lttv.git home made strlen in critical path, tweak git-svn-id: http://ltt.polymtl.ca/svn@784 04897980-b3bd-0310-b5e0-8ef037075253 --- 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;