From 5296af838c39b8b7c4b00a3c896345f9e0719dcf Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 7 Sep 2011 23:16:29 +0000 Subject: Buflib: Clarification about invalid handles * Enhance allocation function comments to better state the return value and what an invalid value is * Change clients to check for "< 0" instead of "<= 0" or "== 0" * Return -1 or -2 depending on the exact failure in buflib_alloc_ex. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30469 a1c6a512-1295-4272-9138-f99709370657 --- firmware/buflib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/buflib.c') diff --git a/firmware/buflib.c b/firmware/buflib.c index f7ef35ea8b..7c5f3d208e 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c @@ -425,7 +425,7 @@ handle_alloc: goto handle_alloc; } } - return 0; + return -1; } } @@ -471,7 +471,7 @@ buffer_alloc: } else { handle->val=1; handle_free(ctx, handle); - return 0; + return -2; } } -- cgit v1.2.3