mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
execable: no need to check getenv for NULL, it works anyway.
This commit is contained in:
parent
5cb46485dd
commit
12f5676cce
@ -27,7 +27,7 @@ char *find_execable(const char *filename)
|
|||||||
{
|
{
|
||||||
char *path, *p, *n;
|
char *path, *p, *n;
|
||||||
|
|
||||||
p = path = xstrdup(getenv("PATH") ? : "");
|
p = path = xstrdup(getenv("PATH"));
|
||||||
while (p) {
|
while (p) {
|
||||||
n = strchr(p, ':');
|
n = strchr(p, ':');
|
||||||
if (n)
|
if (n)
|
||||||
@ -59,4 +59,3 @@ int exists_execable(const char *filename)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user