]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/string/strchr/stpcspn.[ch]: stpcspn(): Remove unused function
authorAlejandro Colomar <alx@kernel.org>
Wed, 3 Jul 2024 00:18:37 +0000 (02:18 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 9 Jul 2024 01:25:01 +0000 (20:25 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/string/strchr/stpcspn.c [deleted file]
lib/string/strchr/stpcspn.h [deleted file]

index 4e7c0b169f9c1e3fcb5aa767b295b226dd0971ab..184b3d4534a998a4275bded90e75eeb0a730d3b2 100644 (file)
@@ -162,8 +162,6 @@ libshadow_la_SOURCES = \
        string/sprintf/stpeprintf.h \
        string/sprintf/xasprintf.c \
        string/sprintf/xasprintf.h \
-       string/strchr/stpcspn.c \
-       string/strchr/stpcspn.h \
        string/strchr/stpspn.c \
        string/strchr/stpspn.h \
        string/strchr/strnul.c \
diff --git a/lib/string/strchr/stpcspn.c b/lib/string/strchr/stpcspn.c
deleted file mode 100644 (file)
index 7094f18..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#include <config.h>
-
-#include "string/strchr/stpcspn.h"
diff --git a/lib/string/strchr/stpcspn.h b/lib/string/strchr/stpcspn.h
deleted file mode 100644 (file)
index 9fa78d3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#ifndef SHADOW_INCLUDE_LIB_STRING_STRCHR_STPCSPN_H_
-#define SHADOW_INCLUDE_LIB_STRING_STRCHR_STPCSPN_H_
-
-
-#include <config.h>
-
-#include <string.h>
-
-#include "attr.h"
-
-
-// Similar to strcspn(3), but return a pointer instead of an offset.
-// Similar to strchrnul(3), but search for several delimiters.
-// Similar to strpbrk(3), but return 's + strlen(s)' if not found.
-#define stpcspn(s, reject)                                                    \
-({                                                                            \
-       __auto_type  s_ = s;                                                  \
-                                                                              \
-       s_ + strcspn(s_, reject);                                             \
-})
-
-
-#endif  // include guard