diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-15 15:25:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-16 10:27:26 -0700 |
commit | f1e835fa1375f3e1c60eedc87012d1a9c96ce511 (patch) | |
tree | 16b3bda02a98662bfac46aa9414678cab4a2f9f7 | |
parent | cc10837929b2afe4116bb305e69b4bd4a95958de (diff) | |
download | git-f1e835fa1375f3e1c60eedc87012d1a9c96ce511.tar.gz |
abspath.c: have SP around arithmetic operators
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | abspath.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); @@ -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); } |