home made strlen in critical path, tweak
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 16 Aug 2004 00:57:42 +0000 (00:57 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 16 Aug 2004 00:57:42 +0000 (00:57 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@784 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/tracefile.c

index 8a0d52aba31c880e6826dbab4574f5e33896b7c8..d490dd9f0c8a13c3ed4389aa86b9bbee847a4619 100644 (file)
@@ -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;
       
This page took 0.027278 seconds and 4 git commands to generate.