Skip to content

Commit f1e835f

Browse files
committed
abspath.c: have SP around arithmetic operators
Signed-off-by: Junio C Hamano <[email protected]>
1 parent cc10837 commit f1e835f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

abspath.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static const char *real_path_internal(const char *path, int die_on_error)
110110
else
111111
goto error_out;
112112
}
113-
if (len && !is_dir_sep(buf[len-1]))
113+
if (len && !is_dir_sep(buf[len - 1]))
114114
buf[len++] = '/';
115115
strcpy(buf + len, last_elem);
116116
free(last_elem);
@@ -201,7 +201,7 @@ const char *absolute_path(const char *path)
201201
if (!cwd)
202202
die_errno("Cannot determine the current working directory");
203203
len = strlen(cwd);
204-
fmt = (len > 0 && is_dir_sep(cwd[len-1])) ? "%s%s" : "%s/%s";
204+
fmt = (len > 0 && is_dir_sep(cwd[len - 1])) ? "%s%s" : "%s/%s";
205205
if (snprintf(buf, PATH_MAX, fmt, cwd, path) >= PATH_MAX)
206206
die("Too long path: %.*s", 60, path);
207207
}

0 commit comments

Comments
 (0)