From cbdc8c33dd017501fc12ccbe1fc216b369861aee Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 10 Jun 2013 23:10:46 +0200 Subject: [PATCH] remove unused pathlen (Thanks gcc) --- libi3/get_exe_path.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.39.5