From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [Tarantool-patches] [PATCH] stailq: provide better names for args
Date: Tue, 21 Jul 2020 13:55:12 +0300 [thread overview]
Message-ID: <20200721105512.96859-1-gorcunov@gmail.com> (raw)
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
next reply other threads:[~2020-07-21 10:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 10:55 Cyrill Gorcunov [this message]
2020-07-22 23:00 ` Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200721105512.96859-1-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] stailq: provide better names for args' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox