diff options
author | Linus Nordberg <linus@nordu.net> | 2012-01-04 10:05:41 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-01-04 10:05:41 +0100 |
commit | bd18a7210b728cab6f9cebc35cf0b4a05c50a47f (patch) | |
tree | 8cb6a2a7cea7df4b1884291fc4e0e33ef6e89bb0 /lib | |
parent | 15ec61ae50914f16473ce5a2fe8df22636a69f7d (diff) |
Avoid unused variable warning when building without DEBUG.
Spotted by Sam Hartman.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tcp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -158,17 +158,21 @@ tcp_event_cb (struct bufferevent *bev, short events, void *user_data) { struct rs_packet *pkt = (struct rs_packet *) user_data; struct rs_connection *conn = NULL; - struct rs_peer *p = NULL; int sockerr = 0; #if defined (RS_ENABLE_TLS) unsigned long tlserr = 0; #endif +#if defined (DEBUG) + struct rs_peer *p = NULL; +#endif assert (pkt); assert (pkt->conn); - assert (pkt->conn->active_peer); conn = pkt->conn; +#if defined (DEBUG) + assert (pkt->conn->active_peer); p = conn->active_peer; +#endif conn->is_connecting = 0; if (events & BEV_EVENT_CONNECTED) |