]> Sergey Matveev's repositories - nnn.git/commitdiff
Use packed structures
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 7 Mar 2019 13:53:23 +0000 (19:23 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 7 Mar 2019 23:19:43 +0000 (04:49 +0530)
src/nnn.c
src/nnn.h

index f1c846b0ddaa6f45b255acf021b7a68699fc38bc..515aa467fa9393190d2785158894507f9da36e85 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -269,7 +269,7 @@ typedef struct entry {
 typedef struct {
        int key;
        char *loc;
-} bm;
+} __attribute__ ((packed)) bm;
 
 /* Settings */
 typedef struct {
@@ -307,7 +307,7 @@ typedef struct {
        char c_name[NAME_MAX + 1]; /* Current file name */
        settings c_cfg; /* Current configuration */
        uint color; /* Color code for directories */
-} context;
+} __attribute__ ((packed)) context;
 
 /* GLOBALS */
 
index b535639b27f886136d9bf0c4c838f4b1ea5de89a..d278466e2f63c70367a2d0ee101cc84e8da88738 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -103,7 +103,7 @@ enum action {
 struct key {
        int sym;         /* Key pressed */
        enum action act; /* Action */
-};
+} __attribute__ ((packed));
 
 static struct key bindings[] = {
        /* Back */