From 00f69cb56e12b9c0106d45bbbf11b98fbcc4239f Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 17 Mar 2022 22:59:44 +0100 Subject: [PATCH] afs.c: Rename ->handler of struct callback_query to ->cb. The term "handler" is already overloaded. Besides command and signal handlers we have callback result handlers, table event handlers and max size handlers for para buffers. The simple "cb" is a shorter and clearer name for the callback function pointer. --- afs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/afs.c b/afs.c index 06b4132a..c162cef4 100644 --- a/afs.c +++ b/afs.c @@ -100,7 +100,7 @@ extern uint32_t afs_socket_cookie; */ struct callback_query { /** The function to be called. */ - afs_callback *handler; + afs_callback *cb; /** The number of bytes of the query */ size_t query_size; }; @@ -191,7 +191,7 @@ int send_callback_request(afs_callback *f, struct osl_object *query, if (ret < 0) goto out; cq = query_shm; - cq->handler = f; + cq->cb = f; cq->query_size = query_shm_size - sizeof(*cq); if (query) @@ -798,7 +798,7 @@ static int call_callback(int fd, int query_shmid) .fd = fd, .band = SBD_OUTPUT }; - ret = cq->handler(&aca); + ret = cq->cb(&aca); ret2 = shm_detach(query_shm); if (ret2 < 0) { if (ret < 0) /* ignore (but log) detach error */ -- 2.39.5