summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/string.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-19 07:32:46 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit861cc855803f67334f3bc377d664ab54be34b5cb (patch)
tree5a129cef365288f6befdcaf590675e816e587fa7 /util/nvmutil/lib/string.c
parent1b82927843801636031c5b00baa1b86ee3e594c2 (diff)
nvmutil: remove memcmp/memcpy/strrchr/rename
i had this idea in my head of later porting this to k&r c for fun. but screw it. compiling on everything since 1989 is enough Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/lib/string.c')
-rw-r--r--util/nvmutil/lib/string.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/util/nvmutil/lib/string.c b/util/nvmutil/lib/string.c
index 4f55c0d3..4139c354 100644
--- a/util/nvmutil/lib/string.c
+++ b/util/nvmutil/lib/string.c
@@ -81,43 +81,3 @@ xstrxlen(const char *scmp, unsigned long maxlen)
return xstr_index;
}
-
-char *
-x_c_strrchr(const char *s, int c)
-{
- const char *p = NULL;
-
- for ( ; *s; s++)
- if (*s == (char)c)
- p = s;
-
- if (c == '\0')
- return (char *)s;
-
- return (char *)p;
-}
-
-void *
-x_v_memcpy(void *dst, const void *src, unsigned long n)
-{
- unsigned char *d = (unsigned char *)dst;
- const unsigned char *s = (const unsigned char *)src;
-
- while (n--)
- *d++ = *s++;
-
- return dst;
-}
-
-int
-x_i_memcmp(const void *a, const void *b, unsigned long n)
-{
- const unsigned char *pa = (const unsigned char *)a;
- const unsigned char *pb = (const unsigned char *)b;
-
- for ( ; n--; ++pa, ++pb)
- if (*pa != *pb)
- return *pa - *pb;
-
- return 0;
-}