Code

connect.c: stricter port validation, silence compiler warning
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sun, 21 Dec 2008 01:12:11 +0000 (02:12 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Dec 2008 09:48:23 +0000 (01:48 -0800)
commit8f1482536ad680fcd738158e76e254a534f2e690
tree2b3b49ebe6e1c9a894b80250c9efcc04c47df5ff
parenta128a2cdc35cdf0eff7eeb1c21b912209f133633
connect.c: stricter port validation, silence compiler warning

In addition to checking if the provided port is numeric, also check
that the string isn't empty and that the port number is within the
valid range.  Incidentally, this silences a compiler warning about
ignoring strtol's return value.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c