chiark / gitweb /
util: remove normalize_env_assignment(), it's unused
authorLennart Poettering <lennart@poettering.net>
Fri, 10 Apr 2015 10:21:44 +0000 (12:21 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:57:50 +0000 (07:57 +0100)
src/shared/util.c
src/shared/util.h

index a82ac25..aea5364 100644 (file)
@@ -3696,36 +3696,6 @@ static char *unquote(const char *s, const char* quotes) {
         return strdup(s);
 }
 
-char *normalize_env_assignment(const char *s) {
-        _cleanup_free_ char *value = NULL;
-        const char *eq;
-        char *p, *name;
-
-        eq = strchr(s, '=');
-        if (!eq) {
-                char *r, *t;
-
-                r = strdup(s);
-                if (!r)
-                        return NULL;
-
-                t = strstrip(r);
-                if (t != r)
-                        memmove(r, t, strlen(t) + 1);
-
-                return r;
-        }
-
-        name = strndupa(s, eq - s);
-        p = strdupa(eq + 1);
-
-        value = unquote(strstrip(p), QUOTES);
-        if (!value)
-                return NULL;
-
-        return strjoin(strstrip(name), "=", value, NULL);
-}
-
 int wait_for_terminate(pid_t pid, siginfo_t *status) {
         siginfo_t dummy;
 
index 9368e84..00e33f0 100644 (file)
@@ -523,8 +523,6 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne
 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
 int touch(const char *path);
 
-char *normalize_env_assignment(const char *s);
-
 int wait_for_terminate(pid_t pid, siginfo_t *status);
 int wait_for_terminate_and_warn(const char *name, pid_t pid, bool check_exit_code);