瀏覽代碼

No need to use packed structs

master
Arun Prakash Jana 5 年之前
父節點
當前提交
8882aa8022
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. +3
    -3
      src/nnn.c
  2. +1
    -1
      src/nnn.h

+ 3
- 3
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 */



+ 1
- 1
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 */


Loading…
取消
儲存