From: Michael Stapelberg Date: Mon, 10 Jun 2013 21:10:46 +0000 (+0200) Subject: remove unused pathlen (Thanks gcc) X-Git-Tag: 4.6~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cbdc8c33dd017501fc12ccbe1fc216b369861aee;p=i3%2Fi3 remove unused pathlen (Thanks gcc) --- diff --git a/libi3/get_exe_path.c b/libi3/get_exe_path.c index 32fa544b..a6a587d9 100644 --- a/libi3/get_exe_path.c +++ b/libi3/get_exe_path.c @@ -46,13 +46,11 @@ const char *get_exe_path(const char *argv0) { /* Fall back to searching $PATH (or _CS_PATH in absence of $PATH). */ char *path = getenv("PATH"); - size_t pathlen; if (path == NULL) { /* _CS_PATH is typically something like "/bin:/usr/bin" */ - pathlen = confstr(_CS_PATH, tmp, sizeof(tmp)); + confstr(_CS_PATH, tmp, sizeof(tmp)); sasprintf(&path, ":%s", tmp); } else { - pathlen = strlen(path); path = strdup(path); } const char *component;