Skip to content

Commit 4e62097

Browse files
committed
forgot some files
1 parent 393d0b1 commit 4e62097

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/dln.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size, int exe
7272
struct stat st;
7373
size_t i, fnlen, fspace;
7474

75-
if(!path)
76-
return NULL;
77-
78-
7975
#if !defined(__APPLE__) && !defined(__linux__)
8076
static const char extension[][5] = {
8177
".exe", ".com", ".cmd", ".bat"
@@ -87,6 +83,9 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size, int exe
8783

8884
const char *p = fname;
8985

86+
if(!path)
87+
return NULL;
88+
9089
#define RETURN_IF(expr) if (expr) return (char *)fname;
9190

9291
RETURN_IF(!fname);
@@ -100,12 +99,12 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size, int exe
10099
# ifndef CharNext
101100
# define CharNext(p) ((p)+1)
102101
# endif
103-
// # ifdef DOSISH_DRIVE_LETTER
102+
# ifdef DOSISH_DRIVE_LETTER
104103
if (((p[0] | 0x20) - 'a') < 26 && p[1] == ':') {
105104
p += 2;
106105
is_abs = 1;
107106
}
108-
// # endif
107+
# endif
109108
switch (*p) {
110109
case '/': case '\\':
111110
is_abs = 1;

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mrb_execarg_fill(mrb_state *mrb, mrb_value env, mrb_value *argv, mrb_int argc, m
102102
}
103103

104104
tCmd = mrb_string_value_ptr(mrb, argv[0]);
105-
// fCmd = NULL;
105+
106106
fCmd = dln_find_exe_r(tCmd, NULL, buf, sizeof(buf));
107107

108108
do_exit = !fCmd && strncmp("exit", tCmd, 4) == 0;

0 commit comments

Comments
 (0)