Ver código fonte

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

git-svn-id: branches/wasm@47948 -
nickysn 4 anos atrás
pai
commit
065d2c718d
1 arquivos alterados com 1 adições e 3 exclusões
  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;
 var
-  lp: pchar;
   i: size_t;
 begin
-  lp := p;
   i := 0;
-  while lp[i]<>#0 do
+  while p[i]<>#0 do
     Inc(i);
   StrLen := i;
 end;