Skip to content

Commit

Permalink
abspath.c: have SP around arithmetic operators
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
gitster committed Oct 16, 2013
1 parent cc10837 commit f1e835f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions abspath.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static const char *real_path_internal(const char *path, int die_on_error)
else
goto error_out;
}
if (len && !is_dir_sep(buf[len-1]))
if (len && !is_dir_sep(buf[len - 1]))
buf[len++] = '/';
strcpy(buf + len, last_elem);
free(last_elem);
Expand Down Expand Up @@ -201,7 +201,7 @@ const char *absolute_path(const char *path)
if (!cwd)
die_errno("Cannot determine the current working directory");
len = strlen(cwd);
fmt = (len > 0 && is_dir_sep(cwd[len-1])) ? "%s%s" : "%s/%s";
fmt = (len > 0 && is_dir_sep(cwd[len - 1])) ? "%s%s" : "%s/%s";
if (snprintf(buf, PATH_MAX, fmt, cwd, path) >= PATH_MAX)
die("Too long path: %.*s", 60, path);
}
Expand Down

0 comments on commit f1e835f

Please sign in to comment.