[PATCH] Parenthesize ternary conditional expression; drop superfluous comment.

1 view
Skip to first unread message

Eric Sunshine

unread,
Sep 29, 2010, 1:37:49 PM9/29/10
to msy...@googlegroups.com, git...@pobox.com
Minor changes to "Fix 'clone' failure at DOS root directory" requested
by Junio [1][2]. Should be squashed with msysgit commit
fe57b3575ec0809a53a6b1392bd04288cc56a2f7 upon next msysgit rebase and/or
before sending to Junio.

[1] http://marc.info/?l=git&m=128570102331652&w=2
[2] http://marc.info/?l=git&m=128573246704862&w=2

Signed-off-by: Eric Sunshine <suns...@sunshineco.com>
---
abspath.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/abspath.c b/abspath.c
index 6b4dfe2..91ca00f 100644
--- a/abspath.c
+++ b/abspath.c
@@ -114,8 +114,7 @@ const char *make_nonrelative_path(const char *path)
if (!cwd)
die_errno("Cannot determine the current working directory");
len = strlen(cwd);
- /* For cwd c:/, return c:/foo rather than URL-like c://foo */
- 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);
}
--
1.7.2.3.msysgit.0.311.gb27be.dirty

Reply all
Reply to author
Forward
0 new messages