From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 B7C8542EF5C for ; Thu, 18 Jun 2020 01:04:07 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id d7so2238593lfi.12 for ; Wed, 17 Jun 2020 15:04:07 -0700 (PDT) From: Cyrill Gorcunov Date: Thu, 18 Jun 2020 01:03:31 +0300 Message-Id: <20200617220335.836265-3-gorcunov@gmail.com> In-Reply-To: <20200617220335.836265-1-gorcunov@gmail.com> References: <20200617220335.836265-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/6] xlog: xlog_cursor -- eliminate redundant pad in the structure List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy , Alexander Turenko This makes structure less in size and eliminates useless padding (both enum and fd are integers 4 bytes long). Signed-off-by: Cyrill Gorcunov --- src/box/xlog.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/box/xlog.h b/src/box/xlog.h index a48b05fc4..47df3a549 100644 --- a/src/box/xlog.h +++ b/src/box/xlog.h @@ -649,13 +649,13 @@ enum xlog_cursor_state { /** * Xlog cursor, read rows from xlog */ -struct xlog_cursor -{ +struct xlog_cursor { + /** cursor current state */ enum xlog_cursor_state state; - /** xlog meta info */ - struct xlog_meta meta; /** file descriptor or -1 for in memory */ int fd; + /** xlog meta info */ + struct xlog_meta meta; /** associated file name */ char name[PATH_MAX]; /** file read buffer */ -- 2.26.2