]> git.sur5r.net Git - i3/i3/commitdiff
remove unused pathlen (Thanks gcc)
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 10 Jun 2013 21:10:46 +0000 (23:10 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 10 Jun 2013 21:10:46 +0000 (23:10 +0200)
libi3/get_exe_path.c

index 32fa544b164b0f93c235ff8f0d418c7acf09a0c5..a6a587d9cb2d38fa3b2f58db8d4e3f010eadb710 100644 (file)
@@ -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;