summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-26 21:26:33 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:25:56 +0100
commitf3e2e81d5385b9ffd84ed110d00eb347ec0e14f1 (patch)
tree522c2ad74abd4d6ac5eee6640fe1a31c4f0b42c8 /src/basic/util.c
parentf4f15635ec05293ffcc83a5b39f624bbabbd8fd0 (diff)
util: move string_is_safe() to string-util.[ch]
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 92ce009620..b85e3c020a 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -886,23 +886,6 @@ bool in_initrd(void) {
return saved;
}
-bool string_is_safe(const char *p) {
- const char *t;
-
- if (!p)
- return false;
-
- for (t = p; *t; t++) {
- if (*t > 0 && *t < ' ')
- return false;
-
- if (strchr("\\\"\'\x7f", *t))
- return false;
- }
-
- return true;
-}
-
/* hey glibc, APIs with callbacks without a user pointer are so useless */
void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
int (*compar) (const void *, const void *, void *), void *arg) {