summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-09 20:43:35 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-09 20:43:35 +0000
commit12e8e432368a300517a789bd6045502964ad95cf (patch)
tree854b4ca198d54b2c875398781d3e62dfacf931ba /apps
parent526346b6a7d63e0b765c4e1177f12ce768932db7 (diff)
downloadrockbox-12e8e432368a300517a789bd6045502964ad95cf.tar.gz
rockbox-12e8e432368a300517a789bd6045502964ad95cf.zip
Use signed variable to check available buffer size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29848 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index ec566dba06..249cd8f5c1 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -177,12 +177,14 @@ void codec_get_full_path(char *path, const char *codec_root_fn)
177void *codec_get_buffer_callback(size_t *size) 177void *codec_get_buffer_callback(size_t *size)
178{ 178{
179 void *buf = &codecbuf[codec_size]; 179 void *buf = &codecbuf[codec_size];
180 *size = CODEC_SIZE - codec_size; 180 ssize_t s = CODEC_SIZE - codec_size;
181 ALIGN_BUFFER(buf, *size, CACHEALIGN_SIZE);
182 181
183 if (*size <= 0) 182 if (s <= 0)
184 return NULL; 183 return NULL;
185 184
185 *size = s;
186 ALIGN_BUFFER(buf, *size, CACHEALIGN_SIZE);
187
186 return buf; 188 return buf;
187} 189}
188 190