author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 7 Aug 2010 23:09:45 +0000 (18:09 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Aug 2010 18:35:46 +0000 (11:35 -0700) | ||
commit | 1702b1381e2a7193d74f6dc649c86e15ec72b4dc | |
tree | 75a43721a4fbe353eb907235e26d3f592799953a | tree | snapshot |
parent | 24aea033138561e5501ee5dfb3459f3ae4940625 | commit | diff |
imap-send: Fix sprintf usage
When composing a command for the imap server, imap-send uses a single
nfsnprintf() invocation for brevity instead of dealing separately with
the case when there is a message to be sent and the case when there
isn’t. The unused argument in the second case, while valid, is
confusing for static analyzers and human readers.
v1.6.4-rc0~117 (imap-send: add support for IPv6, 2009-05-25)
mistakenly used %hu as the format for an int “port”, by analogy with
existing usage for the unsigned short “addr.sin_port”. Use %d
instead.
Noticed with clang.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When composing a command for the imap server, imap-send uses a single
nfsnprintf() invocation for brevity instead of dealing separately with
the case when there is a message to be sent and the case when there
isn’t. The unused argument in the second case, while valid, is
confusing for static analyzers and human readers.
v1.6.4-rc0~117 (imap-send: add support for IPv6, 2009-05-25)
mistakenly used %hu as the format for an int “port”, by analogy with
existing usage for the unsigned short “addr.sin_port”. Use %d
instead.
Noticed with clang.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c | diff | blob | history |