From dbd5b24dbd8d11487e5679a0653f689950ce6426 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 18 Aug 2014 20:21:16 +0200 Subject: [PATCH] make deltaU32() as inline fcn --- src/tvheadend.h | 3 ++- src/utils.c | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tvheadend.h b/src/tvheadend.h index 8597d9c5..0b557f51 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -718,7 +718,8 @@ int makedirs ( const char *path, int mode ); int rmtree ( const char *path ); char *regexp_escape ( const char *str ); -uint32_t deltaU32(uint32_t a, uint32_t b); + +static inline uint32_t deltaU32(uint32_t a, uint32_t b) { return (a > b) ? (a - b) : (b - a); } #define SKEL_DECLARE(name, type) type *name; #define SKEL_ALLOC(name) do { if (!name) name = calloc(1, sizeof(*name)); } while (0) diff --git a/src/utils.c b/src/utils.c index 039f4178..9c252a4b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -585,8 +585,3 @@ regexp_escape(const char* str) *b = 0; return tmp; } - -uint32_t deltaU32(uint32_t a, uint32_t b) -{ - return (a > b) ? (a - b) : (b - a); -}