summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/buflib.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-03 01:38:58 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-03 01:38:58 +0000
commit85ece84b1c955e2304e8519eb40ad8212a32a3ba (patch)
tree2b70dd38cfa86f04028556eaaeff383e3afc381e /apps/plugins/lib/buflib.c
parentaf6060a987a2ad6ecdf62eb6b13dca61d65d7318 (diff)
downloadrockbox-85ece84b1c955e2304e8519eb40ad8212a32a3ba.tar.gz
rockbox-85ece84b1c955e2304e8519eb40ad8212a32a3ba.zip
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
Diffstat (limited to 'apps/plugins/lib/buflib.c')
-rw-r--r--apps/plugins/lib/buflib.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/apps/plugins/lib/buflib.c b/apps/plugins/lib/buflib.c
index ddfc82c521..5d03ca4bb9 100644
--- a/apps/plugins/lib/buflib.c
+++ b/apps/plugins/lib/buflib.c
@@ -40,13 +40,6 @@
40 * case that use a predefined context. 40 * case that use a predefined context.
41 */ 41 */
42 42
43#define ABS(x) \
44({ \
45 typeof(x) xtmp_abs_ = x; \
46 xtmp_abs_ = xtmp_abs_ < 0 ? -xtmp_abs_ : xtmp_abs_; \
47 xtmp_abs_; \
48})
49
50/* Initialize buffer manager */ 43/* Initialize buffer manager */
51void 44void
52buflib_init(struct buflib_context *ctx, void *buf, size_t size) 45buflib_init(struct buflib_context *ctx, void *buf, size_t size)