Fix checks on buflib allocated handles (0 is not a valid handle value)

Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
This commit is contained in:
Bertrik Sikken 2012-06-10 17:15:47 +02:00
parent 900cf6d52b
commit d023bf0f5d
6 changed files with 7 additions and 7 deletions

View file

@ -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)
{
close(fd);
return;