Displaying 1 result from an estimated 1 matches for "604dd89".
Did you mean:
604589
2019 Sep 19
1
[PATCH nbdkit] server: Remove tricksy initialization of struct b_conn_handle.
...n->nr_handles * sizeof *conn->handles);
for_each_backend (b)
- conn->handles[b->i].handle = NULL;
+ reset_b_conn_handle (&conn->handles[b->i]);
conn->status = 1;
conn->nworkers = nworkers;
diff --git a/server/internal.h b/server/internal.h
index c31bb34..604dd89 100644
--- a/server/internal.h
+++ b/server/internal.h
@@ -168,6 +168,23 @@ struct b_conn_handle {
int can_cache;
};
+static inline void
+reset_b_conn_handle (struct b_conn_handle *h)
+{
+ h->handle = NULL;
+ h->exportsize = -1;
+ h->can_write = -1;
+ h->can_flush = -1;
+ h-&...