summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-23 08:17:24 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit8e3c2431d298404c67115ab9781e3f4e289a01cd (patch)
tree84ef41d37a479070ee56410ce83b48fdbcec3f17
parentfe9f813b914df4d0451f8e7b12eca0408db625bf (diff)
Prep v239: Unmask delete_chars()
-rw-r--r--src/basic/string-util.c2
-rw-r--r--src/basic/string-util.h2
-rw-r--r--src/test/test-string-util.c4
3 files changed, 0 insertions, 8 deletions
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index 4f616db53..d7ba43541 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -272,7 +272,6 @@ char *strstrip(char *s) {
return delete_trailing_chars(skip_leading_chars(s, WHITESPACE), WHITESPACE);
}
-#if 0 /// UNNEEDED by elogind
char *delete_chars(char *s, const char *bad) {
char *f, *t;
@@ -295,7 +294,6 @@ char *delete_chars(char *s, const char *bad) {
return s;
}
-#endif // 0
char *delete_trailing_chars(char *s, const char *bad) {
char *p, *c = s;
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 89309c298..d3a01a65e 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -118,9 +118,7 @@ char *strjoin_real(const char *x, ...) _sentinel_;
})
char *strstrip(char *s);
-#if 0 /// UNNEEDED by elogind
char *delete_chars(char *s, const char *bad);
-#endif // 0
char *delete_trailing_chars(char *s, const char *bad);
char *truncate_nl(char *s);
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index a9e322f0c..202af8bcc 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -384,7 +384,6 @@ static void test_endswith_no_case(void) {
assert_se(!endswith_no_case("foobar", "FOOBARFOOFOO"));
}
-#if 0 /// UNNEEDED by elogind
static void test_delete_chars(void) {
char *s, input[] = " hello, waldo. abc";
@@ -392,7 +391,6 @@ static void test_delete_chars(void) {
assert_se(streq(s, "hello,waldo.abc"));
assert_se(s == input);
}
-#endif // 0
static void test_delete_trailing_chars(void) {
@@ -526,9 +524,7 @@ int main(int argc, char *argv[]) {
test_foreach_word_quoted();
test_endswith();
test_endswith_no_case();
-#if 0 /// UNNEEDED by elogind
test_delete_chars();
-#endif // 0
test_delete_trailing_chars();
test_delete_trailing_slashes();
test_skip_leading_chars();