Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 280780
Collapse All | Expand All

(-)python.c-r1 (-1 / +9 lines)
Lines 33-39 const char* find_path(const char* exe) Link Here
33
	{
33
	{
34
		return strndup(exe, last_slash - exe);
34
		return strndup(exe, last_slash - exe);
35
	}
35
	}
36
	char* path = strdup(getenv("PATH"));
36
	const char* PATH = getenv("PATH");
37
	if (!PATH)
38
	{
39
		/* If PATH is unset, then it defaults to ":/bin:/usr/bin", per
40
		 * execvp(3).
41
		 */
42
		PATH = ":/bin:/usr/bin"
43
	}
44
	char* path = strdup(PATH);
37
	char* state;
45
	char* state;
38
	const char* token = strtok_r(path, ":", &state);
46
	const char* token = strtok_r(path, ":", &state);
39
	while (token)
47
	while (token)

Return to bug 280780