Displaying 2 results from an estimated 2 matches for "90d2f71".
[PATCH libnbd v2 02/10] lib: Add macros to check if a callback is "null" or not, and set it to null.
2019 Aug 15
0
[PATCH libnbd v2 02/10] lib: Add macros to check if a callback is "null" or not, and set it to null.
...l retire = cmd->type == NBD_CMD_DISC;
next = cmd->next;
- if (cmd->cb.completion.callback) {
+ if (CALLBACK_IS_NOT_NULL (cmd->cb.completion)) {
int error = cmd->error ? cmd->error : ENOTCONN;
int r;
diff --git a/lib/debug.c b/lib/debug.c
index eec2051..90d2f71 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -82,7 +82,7 @@ nbd_internal_debug (struct nbd_handle *h, const char *fs, ...)
if (r == -1)
goto out;
- if (h->debug_callback.callback)
+ if (CALLBACK_IS_NOT_NULL (h->debug_callback))
/* ignore return value */
CALL_CALLBACK (h...
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series:
https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html
https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html
plus changes to allow .callback = NULL / .free != NULL, and to reduce
the complexity of freeing callbacks.
Although it's rather long there's nothing complex here. We might
consider squashing some