Skip to content

Commit

Permalink
Remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Nov 22, 2024
1 parent 76ed051 commit c6fa3e0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,12 @@ get_cmd_path(const char *cmd)

if (*cmd == '~') {
char *p = tilde_expand(cmd);
// if (p && access(p, X_OK) == 0)
if (p && is_exec_cmd(p) == 1)
cmd_path = p;
return cmd_path;
}

if (*cmd == '/') {
// if (access(cmd, X_OK) == 0)
if (is_exec_cmd(cmd) == 1)
cmd_path = savestring(cmd, strlen(cmd));
return cmd_path;
Expand All @@ -1060,7 +1058,6 @@ get_cmd_path(const char *cmd)
continue;

snprintf(cmd_path, PATH_MAX + 1, "%s/%s", paths[i].path, cmd);
// if (access(cmd_path, X_OK) == 0)
if (is_exec_cmd(cmd_path) == 1)
return cmd_path;
}
Expand All @@ -1084,14 +1081,12 @@ is_cmd_in_path(const char *cmd)

if (*cmd == '~') {
char *p = tilde_expand(cmd);
// const int ret = (p && access(p, X_OK) == 0);
const int ret = (p && is_exec_cmd(p) == 1);
free(p);
return ret;
}

if (*cmd == '/')
// return (access(cmd, X_OK) == 0);
return is_exec_cmd(cmd);

char cmd_path[PATH_MAX + 1];
Expand All @@ -1108,7 +1103,6 @@ is_cmd_in_path(const char *cmd)

snprintf(cmd_path, sizeof(cmd_path), "%s/%s", paths[i].path, cmd);
if (is_exec_cmd(cmd_path) == 1)
// if (access(cmd_path, X_OK) == 0)
return 1;
}

Expand Down

0 comments on commit c6fa3e0

Please sign in to comment.