mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
6a989b8d4d
commit
5296af838c
5 changed files with 15 additions and 10 deletions
|
@ -344,7 +344,7 @@ void filetype_init(void)
|
|||
|
||||
strdup_bufsize = filesize(fd);
|
||||
strdup_handle = core_alloc_ex("filetypes", strdup_bufsize, &ops);
|
||||
if (strdup_handle <= 0)
|
||||
if (strdup_handle < 0)
|
||||
return;
|
||||
read_builtin_types();
|
||||
read_config(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue