From: Roy Marples Date: Thu, 18 Sep 2014 15:12:45 +0000 (+0000) Subject: Remove some inline keywords, let the compiler work it out better. X-Git-Tag: v6.4.5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2743ccc06c89653c6bb21db519a477e44b76c3da;p=thirdparty%2Fdhcpcd.git Remove some inline keywords, let the compiler work it out better. --- diff --git a/compat/arc4random.c b/compat/arc4random.c index 70a459a3..963dd1f7 100644 --- a/compat/arc4random.c +++ b/compat/arc4random.c @@ -54,7 +54,7 @@ static struct arc4_stream rs = { .i = 0xff, .j = 0, .s = { S256 }, #undef S64 #undef S256 -static inline void +static void arc4_addrandom(struct arc4_stream *as, unsigned char *dat, int datlen) { int n; @@ -71,7 +71,7 @@ arc4_addrandom(struct arc4_stream *as, unsigned char *dat, int datlen) as->j = as->i; } -static inline uint8_t +static uint8_t arc4_getbyte(struct arc4_stream *as) { uint8_t si, sj; @@ -85,7 +85,7 @@ arc4_getbyte(struct arc4_stream *as) return (as->s[(si + sj) & 0xff]); } -static inline uint32_t +static uint32_t arc4_getword(struct arc4_stream *as) { uint32_t val; @@ -129,7 +129,7 @@ arc4_stir(struct arc4_stream *as) as->count = 1600000; } -static inline void +static void arc4_stir_if_needed(struct arc4_stream *as) { pid_t pid; diff --git a/compat/endian.h b/compat/endian.h index 3a997a57..35354fbe 100644 --- a/compat/endian.h +++ b/compat/endian.h @@ -30,7 +30,7 @@ #include -static inline void +static void be32enc(uint8_t *buf, uint32_t u) { @@ -40,7 +40,7 @@ be32enc(uint8_t *buf, uint32_t u) buf[3] = (uint8_t)(u & 0xff); } -static inline void +static void be64enc(uint8_t *buf, uint64_t u) { @@ -48,21 +48,21 @@ be64enc(uint8_t *buf, uint64_t u) be32enc(buf + sizeof(uint32_t), (uint32_t)(u & 0xffffffffULL)); } -static inline uint16_t +static uint16_t be16dec(const uint8_t *buf) { return (uint16_t)(buf[0] << 8 | buf[1]); } -static inline uint32_t +static uint32_t be32dec(const uint8_t *buf) { return (uint32_t)((uint32_t)be16dec(buf) << 16 | be16dec(buf + 2)); } -static inline uint64_t +static uint64_t be64dec(const uint8_t *buf) { diff --git a/dhcpcd.c b/dhcpcd.c index 3a1864b1..0e46591b 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -99,7 +99,7 @@ read_pid(const char *pidfile) return pid; } -static inline int +static int write_pid(int fd, pid_t pid) {