[Tarantool-patches] [PATCH] stailq: provide better names for args
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jul 21 13:55:12 MSK 2020
Use self explanatory dest and src (like in strcat).
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
Everytime I see stailq_concat call I've to jump into its
source and figure out what head1 and head2 means. Lets
name the properly.
src/lib/salad/stailq.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lib/salad/stailq.h b/src/lib/salad/stailq.h
index d29aee94a..d37162f9c 100644
--- a/src/lib/salad/stailq.h
+++ b/src/lib/salad/stailq.h
@@ -149,12 +149,12 @@ stailq_empty(struct stailq *head)
* Singly-linked Tail queue functions.
*/
static inline void
-stailq_concat(struct stailq *head1, struct stailq *head2)
+stailq_concat(struct stailq *dest, struct stailq *src)
{
- if (!stailq_empty(head2)) {
- *head1->last = head2->first;
- head1->last = head2->last;
- stailq_create(head2);
+ if (!stailq_empty(src)) {
+ *dest->last = src->first;
+ dest->last = src->last;
+ stailq_create(src);
}
}
--
2.26.2
More information about the Tarantool-patches
mailing list