From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 359D8445320 for ; Tue, 21 Jul 2020 13:55:19 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id h22so23551433lji.9 for ; Tue, 21 Jul 2020 03:55:19 -0700 (PDT) From: Cyrill Gorcunov Date: Tue, 21 Jul 2020 13:55:12 +0300 Message-Id: <20200721105512.96859-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] stailq: provide better names for args List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Use self explanatory dest and src (like in strcat). Signed-off-by: Cyrill Gorcunov --- 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