From 64409c28b78eb22c5b7c2476a3e3e77cb6a92aa4 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 3 Jul 2024 02:18:37 +0200 Subject: [PATCH] lib/string/strchr/stpcspn.[ch]: stpcspn(): Remove unused function Signed-off-by: Alejandro Colomar --- lib/Makefile.am | 2 -- lib/string/strchr/stpcspn.c | 7 ------- lib/string/strchr/stpcspn.h | 27 --------------------------- 3 files changed, 36 deletions(-) delete mode 100644 lib/string/strchr/stpcspn.c delete mode 100644 lib/string/strchr/stpcspn.h diff --git a/lib/Makefile.am b/lib/Makefile.am index 4e7c0b16..184b3d45 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 index 7094f18b..00000000 --- a/lib/string/strchr/stpcspn.c +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-FileCopyrightText: 2024, Alejandro Colomar -// SPDX-License-Identifier: BSD-3-Clause - - -#include - -#include "string/strchr/stpcspn.h" diff --git a/lib/string/strchr/stpcspn.h b/lib/string/strchr/stpcspn.h deleted file mode 100644 index 9fa78d3a..00000000 --- a/lib/string/strchr/stpcspn.h +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: 2024, Alejandro Colomar -// SPDX-License-Identifier: BSD-3-Clause - - -#ifndef SHADOW_INCLUDE_LIB_STRING_STRCHR_STPCSPN_H_ -#define SHADOW_INCLUDE_LIB_STRING_STRCHR_STPCSPN_H_ - - -#include - -#include - -#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