]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - tools/perf/util/string.c
perf string: Simplify ltrim() implementation
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / string.c
index bddca519dd5854a0fd3319e85d54d7e638514b47..e8feb142c9c9c660722cb154e32bae1d19ec3fed 100644 (file)
@@ -322,12 +322,8 @@ char *strxfrchar(char *s, char from, char to)
  */
 char *ltrim(char *s)
 {
-       int len = strlen(s);
-
-       while (len && isspace(*s)) {
-               len--;
+       while (isspace(*s))
                s++;
-       }
 
        return s;
 }