From c4cdc75cebd08b7d199c76cb4f814954354d3b13 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Wed, 30 Apr 2003 02:55:23 +0000 Subject: [PATCH] Better error handling when loading WPS config file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3632 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wps-display.c b/apps/wps-display.c index c35ba8675c..acb839ea50 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -163,7 +163,7 @@ bool wps_load(char* file, bool display) fd = open(file, O_RDONLY); - if (-1 != fd) + if (fd >= 0) { int numread = read(fd, buffer, sizeof(buffer) - 1);