Browse Source

* no need to copy the local var paramater in StrLen()

git-svn-id: branches/wasm@47948 -
nickysn 4 years ago
parent
commit
065d2c718d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      rtl/wasi/system.pp

+ 1 - 3
rtl/wasi/system.pp

@@ -36,12 +36,10 @@ function fd_write(fd: __wasi_fd_t;
 
 
 function StrLen(P: PChar): size_t;
 function StrLen(P: PChar): size_t;
 var
 var
-  lp: pchar;
   i: size_t;
   i: size_t;
 begin
 begin
-  lp := p;
   i := 0;
   i := 0;
-  while lp[i]<>#0 do
+  while p[i]<>#0 do
     Inc(i);
     Inc(i);
   StrLen := i;
   StrLen := i;
 end;
 end;