mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 17:56:41 +00:00
Fix indentation
This commit is contained in:
parent
ae74c69a34
commit
054465c00d
21
nnn.c
21
nnn.c
|
@ -307,8 +307,7 @@ static char * const utils[] = {
|
||||||
#define STR_COPY_ID 4
|
#define STR_COPY_ID 4
|
||||||
#define STR_DATE_ID 5
|
#define STR_DATE_ID 5
|
||||||
|
|
||||||
static const char messages[][16] =
|
static const char messages[][16] = {
|
||||||
{
|
|
||||||
"nftw failed",
|
"nftw failed",
|
||||||
"HOME not set",
|
"HOME not set",
|
||||||
"no traversal",
|
"no traversal",
|
||||||
|
@ -360,17 +359,17 @@ crc8init()
|
||||||
static uchar
|
static uchar
|
||||||
crc8fast(uchar const message[], size_t n)
|
crc8fast(uchar const message[], size_t n)
|
||||||
{
|
{
|
||||||
static uchar data, remainder;
|
static uchar data, remainder;
|
||||||
static size_t byte;
|
static size_t byte;
|
||||||
|
|
||||||
/* Divide the message by the polynomial, a byte at a time */
|
/* Divide the message by the polynomial, a byte at a time */
|
||||||
for (remainder = byte = 0; byte < n; ++byte) {
|
for (remainder = byte = 0; byte < n; ++byte) {
|
||||||
data = message[byte] ^ (remainder >> (WIDTH - 8));
|
data = message[byte] ^ (remainder >> (WIDTH - 8));
|
||||||
remainder = crc8table[data] ^ (remainder << 8);
|
remainder = crc8table[data] ^ (remainder << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The final remainder is the CRC */
|
/* The final remainder is the CRC */
|
||||||
return remainder;
|
return remainder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Messages show up at the bottom */
|
/* Messages show up at the bottom */
|
||||||
|
|
Loading…
Reference in a new issue