From a83a83600748f2b9242e3ecf1315b69537ef03b7 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 11 Apr 2015 10:48:23 -0700 Subject: [PATCH] inline cyclic functions --- args.c | 2 +- crc32.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/args.c b/args.c index 452e3cb..bbcea06 100644 --- a/args.c +++ b/args.c @@ -15,7 +15,7 @@ nextarg() return argv[argi]; } -void +static void args_parse(int argc_, char **argv_, void flagfn(char, char*()), void plainfn(char*)) { diff --git a/crc32.c b/crc32.c index 6e0ebb1..e4a9110 100644 --- a/crc32.c +++ b/crc32.c @@ -1,6 +1,6 @@ enum { CRC_TABLE_SIZE = 0x100 }; -uint32_t +static inline uint32_t crc_reflect(uint32_t input) { uint32_t reflected = 0; @@ -12,7 +12,7 @@ crc_reflect(uint32_t input) return reflected; } -void +static inline void crc_fill_table(uint32_t *table, int big, uint32_t polynomial) { uint32_t lsb = (big) ? 1 << 31 : 1; /* least significant bit */ @@ -32,14 +32,14 @@ crc_fill_table(uint32_t *table, int big, uint32_t polynomial) } } -void +static inline void crc_be_cycle(uint32_t *table, uint32_t *remainder, char c) { uint32_t byte = table[(((*remainder) >> 24) ^ c) & 0xff]; *remainder = (((*remainder) << 8) ^ byte) & 0xFFFFFFFF; } -void +static inline void crc_le_cycle(uint32_t *table, uint32_t *remainder, char c) { uint32_t byte = table[((*remainder) ^ c) & 0xFF];