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-19 07:37:53 +0000
commit846cb235853c553e7196c131dd0dd6a688116de3 (patch)
treeaebff297bc5e739130ffdae354e136f295fa557e /util/nvmutil/lib/string.c
parentf1fda8b43eb03be951846c6df9d0be81be84808e (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;
-}