/* Format the message FMT and queue it to be sent to the client. Client
* input will be disabled until the write completes.
*/
-static void write_to_client(struct client *c, const char *fmt, ...)
+static void PRINTF_LIKE(2, 3)
+ write_to_client(struct client *c, const char *fmt, ...)
{
va_list ap;
char buf[WRBUFSZ];
selbuf_destroy(&px->b);
free_writebuf(&px->wb);
}
- selbuf_enable(&px->c->b);
px->c->px = 0;
+ selbuf_enable(&px->c->b);
xfree(px);
}
int i, t;
/* If the connection has closed, then tidy stuff away. */
+ c->q.s[R].addr = c->raddr;
c->q.s[L].port = c->q.s[R].port = 0;
if (!line) {
disconnect_client(c);
skipws(&q); if (*q) goto bad;
/* Identify the connection. Act on the result. */
- c->q.s[R].addr = c->raddr;
identify(&c->q);
switch (c->q.resp) {
}
/* Quit because of a fatal signal. */
-static void quit(int sig, void *p)
+static void NORETURN quit(int sig, void *p)
{
const char *signame = p;