[Tarantool-patches] [PATCH 2/6] xlog: xlog_cursor -- eliminate redundant pad in the structure

Cyrill Gorcunov gorcunov at gmail.com
Thu Jun 18 01:03:31 MSK 2020


This makes structure less in size and eliminates useless
padding (both enum and fd are integers 4 bytes long).

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 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



More information about the Tarantool-patches mailing list