From: Jaroslav Kysela Date: Mon, 18 Aug 2014 18:21:16 +0000 (+0200) Subject: make deltaU32() as inline fcn X-Git-Tag: v4.1~1510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd5b24dbd8d11487e5679a0653f689950ce6426;p=thirdparty%2Ftvheadend.git make deltaU32() as inline fcn --- diff --git a/src/tvheadend.h b/src/tvheadend.h index 8597d9c5d..0b557f51f 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 039f4178d..9c252a4bd 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); -}