From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (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 63211445320 for ; Fri, 24 Jul 2020 20:50:28 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id q4so10854866lji.2 for ; Fri, 24 Jul 2020 10:50:28 -0700 (PDT) Date: Fri, 24 Jul 2020 20:50:25 +0300 From: Cyrill Gorcunov Message-ID: <20200724175025.GD60766@grain> References: <20200723122942.196011-1-gorcunov@gmail.com> <20200723122942.196011-4-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 3/7] journal: add journal_entry_create helper List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tml On Fri, Jul 24, 2020 at 12:10:47AM +0200, Vladislav Shpilevoy wrote: > > > > +/** > > + * Initialize a new journal entry. > > + */ > > +static inline void > > +journal_entry_create(struct journal_entry *entry, size_t n_rows, > > + size_t approx_len, > > + void (*write_async_cb)(struct journal_entry *entry), > > + void *complete_data) > > +{ > > + /* > > + * fifo member is left untouched because > > + * it is used by the journal engine internally, > > + * no need to waste time here. > > fifo -> Fifo. > > Also you can use up to 80 symbols for comments now. No need to keep them > tight. Here and in all other new places. The fifo is a member of structure. Actually I just ripped off the comment simply because we already have a number of _create helpers which implies to initialize only the member which has to be initialized. If something is not touched it means that the member is left for internal use and can be left unitialized.