summaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-05-13 05:04:58 -0400
committerJunio C Hamano <gitster@pobox.com>2017-05-15 13:01:36 +0900
commit7e936842f54c98eb41fb46c94da417065fe333f5 (patch)
tree07a89812d6da0428a3cb24d8c232c5fc8f024504 /pkt-line.h
parentc0c70f7ac080c3b4ecc50a3207eb66e97c10271d (diff)
downloadgit-7e936842f54c98eb41fb46c94da417065fe333f5.tar.gz
pkt-line: annotate packet_writel with LAST_ARG_MUST_BE_NULL
packet_writel() takes a variable-sized list and reads to the first NULL. Let's let the compiler know so that it can help us catch mistakes in the callers. This should have been annotated similarly when it was a static function, but it's doubly important now that the function is available to the whole code-base. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
-rw-r--r--pkt-line.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkt-line.h b/pkt-line.h
index b2965869ad..450183b649 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -25,6 +25,7 @@ void packet_buf_flush(struct strbuf *buf);
void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
int packet_flush_gently(int fd);
int packet_write_fmt_gently(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
+LAST_ARG_MUST_BE_NULL
int packet_writel(int fd, const char *line, ...);
int write_packetized_from_fd(int fd_in, int fd_out);
int write_packetized_from_buf(const char *src_in, size_t len, int fd_out);