From: Andre Noll Date: Thu, 17 Mar 2022 21:59:44 +0000 (+0100) Subject: afs.c: Rename ->handler of struct callback_query to ->cb. X-Git-Tag: v0.7.2~14^2~6 X-Git-Url: http://git.tuebingen.mpg.de/versions/paraslash-0.3.1.tar.bz2.asc?a=commitdiff_plain;h=00f69cb56e12b9c0106d45bbbf11b98fbcc4239f;p=paraslash.git 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. --- 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 */