From 85ece84b1c955e2304e8519eb40ad8212a32a3ba Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 3 Aug 2009 01:38:58 +0000 Subject: Remove various ABS() definitions with a single one using typeof (if using gcc) to avoid multiple evaluations of the input expressions. Speex still uses its own as I didn't want to change this imported code too much. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22129 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/buflib.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/buflib.c b/apps/plugins/lib/buflib.c index ddfc82c..5d03ca4 100644 --- a/apps/plugins/lib/buflib.c +++ b/apps/plugins/lib/buflib.c @@ -40,13 +40,6 @@ * case that use a predefined context. */ -#define ABS(x) \ -({ \ - typeof(x) xtmp_abs_ = x; \ - xtmp_abs_ = xtmp_abs_ < 0 ? -xtmp_abs_ : xtmp_abs_; \ - xtmp_abs_; \ -}) - /* Initialize buffer manager */ void buflib_init(struct buflib_context *ctx, void *buf, size_t size) -- cgit v1.1