]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/io.c
io: io_never for events that should never happen.
[ccan] / ccan / io / io.c
index 734cb3939636acbf0922362915c5c804bcc2cb97..90039e1e6960155a87862bbc1e86f9cbc987f35f 100644 (file)
@@ -531,6 +531,16 @@ struct io_plan io_break_(void *ret, struct io_plan plan)
        return plan;
 }
 
+static struct io_plan io_never_called(struct io_conn *conn, void *arg)
+{
+       abort();
+}
+
+struct io_plan io_never(void)
+{
+       return io_always_(io_never_called, NULL);
+}
+
 int io_conn_fd(const struct io_conn *conn)
 {
        return conn->fd.fd;