aboutsummaryrefslogtreecommitdiff
path: root/libbb/executable.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/executable.c')
-rw-r--r--libbb/executable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbb/executable.c b/libbb/executable.c
index 76b10f790..aec829945 100644
--- a/libbb/executable.c
+++ b/libbb/executable.c
@@ -66,23 +66,23 @@ char* FAST_FUNC find_executable(const char *filename, char **PATHp)
66 p[0] ? p : ".", /* handle "::" case */ 66 p[0] ? p : ".", /* handle "::" case */
67 filename 67 filename
68 ); 68 );
69 ex = file_is_executable(p);
70#if ENABLE_PLATFORM_MINGW32 69#if ENABLE_PLATFORM_MINGW32
71 if (n) *n++ = sep; 70 if (n) *n++ = sep;
72#else 71#else
73 if (n) *n++ = ':'; 72 if (n) *n++ = ':';
74#endif 73#endif
75 if (ex) {
76 *PATHp = n;
77 return p;
78 }
79#if ENABLE_PLATFORM_MINGW32 74#if ENABLE_PLATFORM_MINGW32
80 else if ((w=add_win32_extension(p))) { 75 if ((w=add_win32_extension(p))) {
81 *PATHp = n; 76 *PATHp = n;
82 free(p); 77 free(p);
83 return w; 78 return w;
84 } 79 }
85#endif 80#endif
81 ex = file_is_executable(p);
82 if (ex) {
83 *PATHp = n;
84 return p;
85 }
86 free(p); 86 free(p);
87 p = n; 87 p = n;
88 } /* on loop exit p == NULL */ 88 } /* on loop exit p == NULL */