diff options
author | Ilari Liusvaara <ilari.liusvaara@elisanet.fi> | 2010-11-17 09:15:34 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-19 11:04:20 -0800 |
commit | 7851b1e60fabe350216d48e6de03a3ed21a49953 (patch) | |
tree | 80880c61f51eb749bffd0034a4831e96a55fe57e /builtin/remote-fd.c | |
parent | 7f3ecebfcda9b32252a4791dc716c1e3d88c9f70 (diff) | |
download | git-7851b1e60fabe350216d48e6de03a3ed21a49953.tar.gz |
remote-fd/ext: finishing touches after code review
When compiling with pthread support, transport-helper.c needs to include
necessary header files. Also fix a few error messages in remote-ext and
remote-fd programs, and a potential buffer underrun in remote-fd.
In the documentation, clarify how %G and %V are used; the old description
looked as if they take repository/vhost parameters, which was wrong.
Also fix AsciiDoc markup for the page title of remote-fd/remote-ext manpages,
and tweak the way how section headers are shown.
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote-fd.c')
-rw-r--r-- | builtin/remote-fd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/remote-fd.c b/builtin/remote-fd.c index 7517f2476c..1f2467bdb7 100644 --- a/builtin/remote-fd.c +++ b/builtin/remote-fd.c @@ -31,7 +31,7 @@ static void command_loop(int input_fd, int output_fd) } /* Strip end of line characters. */ i = strlen(buffer); - while (isspace(buffer[i - 1])) + while (i > 0 && isspace(buffer[i - 1])) buffer[--i] = 0; if (!strcmp(buffer, "capabilities")) { @@ -56,8 +56,8 @@ int cmd_remote_fd(int argc, const char **argv, const char *prefix) int output_fd = -1; char *end; - if (argc < 3) - die("URL missing"); + if (argc != 3) + die("Expected two arguments"); input_fd = (int)strtoul(argv[2], &end, 10); |