remove unused pathlen (Thanks gcc)

This commit is contained in:
Michael Stapelberg 2013-06-10 23:10:46 +02:00
parent 57b43d84f9
commit cbdc8c33dd
1 changed files with 1 additions and 3 deletions

View 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). */ /* Fall back to searching $PATH (or _CS_PATH in absence of $PATH). */
char *path = getenv("PATH"); char *path = getenv("PATH");
size_t pathlen;
if (path == NULL) { if (path == NULL) {
/* _CS_PATH is typically something like "/bin:/usr/bin" */ /* _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); sasprintf(&path, ":%s", tmp);
} else { } else {
pathlen = strlen(path);
path = strdup(path); path = strdup(path);
} }
const char *component; const char *component;