Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] stailq: provide better names for args
@ 2020-07-21 10:55 Cyrill Gorcunov
  2020-07-22 23:00 ` Vladislav Shpilevoy
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2020-07-21 10:55 UTC (permalink / raw)
  To: tml; +Cc: Vladislav Shpilevoy

Use self explanatory dest and src (like in strcat).

Signed-off-by: Cyrill Gorcunov <gorcunov@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-22 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 10:55 [Tarantool-patches] [PATCH] stailq: provide better names for args Cyrill Gorcunov
2020-07-22 23:00 ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox