summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/lib/string.c')
-rw-r--r--util/nvmutil/lib/string.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/util/nvmutil/lib/string.c b/util/nvmutil/lib/string.c
index 517f490b..4139c354 100644
--- a/util/nvmutil/lib/string.c
+++ b/util/nvmutil/lib/string.c
@@ -1,25 +1,14 @@
/* SPDX-License-Identifier: MIT
- *
* Copyright (c) 2026 Leah Rowe <leah@libreboot.org>
*
* String handling.
*/
-#ifdef __OpenBSD__
-#include <sys/param.h>
-#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "../include/common.h"
@@ -92,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;
-}