diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/filetypes.c | 2 | ||||
| -rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 6 | ||||
| -rw-r--r-- | apps/scrobbler.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 942ff32..8f2e912 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -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); diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index c13aca1..a572586 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -1520,9 +1520,11 @@ int read_pfraw(char* filename, int prio) sizeof( pix_t ) * bmph.width * bmph.height; int hid; - while (!(hid = rb->buflib_alloc(&buf_ctx, size)) && free_slide_prio(prio)); + do { + hid = rb->buflib_alloc(&buf_ctx, size); + } while (hid < 0 && free_slide_prio(prio)); - if (!hid) { + if (hid < 0) { rb->close( fh ); return 0; } diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 78414f3..06c957c 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c @@ -255,7 +255,7 @@ int scrobbler_init(void) return -1; scrobbler_cache = core_alloc("scrobbler", SCROBBLER_MAX_CACHE*SCROBBLER_CACHE_LEN); - if (scrobbler_cache <= 0) + if (scrobbler_cache < 0) { logf("SCROOBLER: OOM"); return -1; |