]> Sergey Matveev's repositories - nnn.git/commitdiff
No need to use packed structs
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 11 Mar 2019 14:38:03 +0000 (20:08 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 11 Mar 2019 14:38:03 +0000 (20:08 +0530)
src/nnn.c
src/nnn.h

index 08578063dd074c7d572d41d15d1eb8571d23ae81..1f50339e0be8559cdc88ff8dab8d54d1461b4532 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -267,13 +267,13 @@ typedef struct entry {
        mode_t mode;
        ushort nlen; /* Length of file name; can be uchar (< NAME_MAX + 1) */
        uchar flags; /* Flags specific to the file */
-} __attribute__ ((packed, aligned(_ALIGNMENT))) *pEntry;
+} __attribute__ ((aligned(_ALIGNMENT))) *pEntry;
 
 /* Bookmark */
 typedef struct {
        int key;
        char *loc;
-} __attribute__ ((packed)) bm;
+} bm;
 
 /* Settings */
 typedef struct {
@@ -311,7 +311,7 @@ typedef struct {
        char c_name[NAME_MAX + 1]; /* Current file name */
        settings c_cfg; /* Current configuration */
        uint color; /* Color code for directories */
-} __attribute__ ((packed)) context;
+} context;
 
 /* GLOBALS */
 
index c593685b01913486bcd2711cfceb5a3e380dd870..a2a858bfe97e64e425de6a64ffa69ecc7f0faca0 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -102,7 +102,7 @@ enum action {
 struct key {
        int sym;         /* Key pressed */
        enum action act; /* Action */
-} __attribute__ ((packed));
+};
 
 static struct key bindings[] = {
        /* Back */