summaryrefslogtreecommitdiffstats
path: root/opacket.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2015-02-24 02:30:59 +0100
committerDarren Tucker <dtucker@zip.com.au>2015-02-24 02:30:59 +0100
commitdcc8997d116f615195aa7c9ec019fb36c28c6228 (patch)
treefe2b276636ec05203f48608e2ff734e4c76dbf68 /opacket.h
parentupstream commit (diff)
downloadopenssh-dcc8997d116f615195aa7c9ec019fb36c28c6228.tar.xz
openssh-dcc8997d116f615195aa7c9ec019fb36c28c6228.zip
Convert two macros into functions.
Convert packet_send_debug and packet_disconnect from macros to functions. Some older GCCs (2.7.x, 2.95.x) see to have problems with variadic macros with only one argument so we convert these two into functions. ok djm@
Diffstat (limited to '')
-rw-r--r--opacket.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/opacket.h b/opacket.h
index 16fcb9e28..a0a60e550 100644
--- a/opacket.h
+++ b/opacket.h
@@ -102,10 +102,11 @@ void packet_read_expect(int expected_type);
ssh_packet_get_string_ptr(active_state, (length_ptr))
#define packet_get_cstring(length_ptr) \
ssh_packet_get_cstring(active_state, (length_ptr))
-#define packet_send_debug(fmt, args...) \
- ssh_packet_send_debug(active_state, (fmt), ##args)
-#define packet_disconnect(fmt, args...) \
- ssh_packet_disconnect(active_state, (fmt), ##args)
+void packet_send_debug(const char *, ...)
+ __attribute__((format(printf, 1, 2)));
+void packet_disconnect(const char *, ...)
+ __attribute__((format(printf, 1, 2)))
+ __attribute__((noreturn));
#define packet_have_data_to_write() \
ssh_packet_have_data_to_write(active_state)
#define packet_not_very_much_data_to_write() \