summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-10 12:16:54 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-10 12:16:54 +0200
commite1eaca26cb971410ac9668c4123bcecaecedb3ab (patch)
tree277b4ca5b80577b047f6edcd0041f3fa78f50c6a /src/shared/util.c
parent8ebac1f9a681ce1c6287e7c6a1b3093b00fb0c5a (diff)
util: mark unquote() static, so that new code doesn't use this anymore
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 61f3090e20..6e5c5ca61a 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3655,14 +3655,15 @@ int touch(const char *path) {
return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, 0);
}
-char *unquote(const char *s, const char* quotes) {
+static char *unquote(const char *s, const char* quotes) {
size_t l;
assert(s);
/* This is rather stupid, simply removes the heading and
* trailing quotes if there is one. Doesn't care about
- * escaping or anything. We should make this smarter one
- * day... */
+ * escaping or anything.
+ *
+ * DON'T USE THIS FOR NEW CODE ANYMORE!*/
l = strlen(s);
if (l < 2)
@@ -3851,7 +3852,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
_cleanup_free_ char *t = NULL, *u = NULL;
size_t enc_len;
- u = unquote(tagvalue, "\"\'");
+ u = unquote(tagvalue, QUOTES);
if (!u)
return NULL;