]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - tools/perf/util/string.c
Revert "perf tools: Default to cpu// for events v5"
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / string.c
index d87767f76903e17f2e59a93ad36bc6e6b2f2e6a0..6afd6106ceb51c8d5d3997acb161a255cacffa84 100644 (file)
@@ -357,27 +357,3 @@ void *memdup(const void *src, size_t len)
 
        return p;
 }
-
-/**
- * str_append - reallocate string and append another
- * @s: pointer to string pointer
- * @len: pointer to len (initialized)
- * @a: string to append.
- */
-int str_append(char **s, int *len, const char *a)
-{
-       int olen = *s ? strlen(*s) : 0;
-       int nlen = olen + strlen(a) + 1;
-       if (*len < nlen) {
-               *len = *len * 2;
-               if (*len < nlen)
-                       *len = nlen;
-               *s = realloc(*s, *len);
-               if (!*s)
-                       return -ENOMEM;
-               if (olen == 0)
-                       **s = 0;
-       }
-       strcat(*s, a);
-       return 0;
-}