]> Sergey Matveev's repositories - nnn.git/commitdiff
Update crc8 vars
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 19 Oct 2018 02:31:42 +0000 (08:01 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 19 Oct 2018 02:31:42 +0000 (08:01 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index bba9ac6a00725ab2b0fc5cd0b716aad53461bd31..536a7f89314063ea845b13987919351243041a27 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -186,7 +186,7 @@ disabledbg()
 #define F_NORMAL   0x80  /* spawn child process in non-curses regular CLI mode */
 
 /* CRC8 macros */
-#define WIDTH  (8 * sizeof(unsigned char))
+#define WIDTH  (sizeof(unsigned char) << 3)
 #define TOPBIT (1 << (WIDTH - 1))
 #define POLYNOMIAL 0xD8  /* 11011 followed by 0's */
 #define CRC8_TABLE_LEN 256
@@ -278,7 +278,7 @@ static uint open_max;
 static bm bookmark[BM_MAX];
 static uchar BLK_SHIFT = 9;
 
-static uchar crc8table[CRC8_TABLE_LEN];
+static uchar crc8table[CRC8_TABLE_LEN] __attribute__ ((aligned));
 static uchar g_crc;
 
 #ifdef LINUX_INOTIFY