diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-20 16:39:22 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-09-20 16:39:22 +0000 |
commit | 72404784578162495c9986cd1563d9924ddc15be (patch) | |
tree | 86a0d13d216536b58b8293bf8a8fcdb0ef23a14b /firmware/common/filefuncs.c | |
parent | 11ce23a9890699141dc7ab1c12778d32db6ea932 (diff) | |
download | rockbox-72404784578162495c9986cd1563d9924ddc15be.tar.gz rockbox-72404784578162495c9986cd1563d9924ddc15be.zip |
file_exists(): fix DEBUGF()
- %s was missing the argument (function name)
- add %p to print the function argument
- also don't call strlen() to test string nullity (and strlen() can't return a negative result)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28123 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/filefuncs.c')
-rw-r--r-- | firmware/common/filefuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/filefuncs.c b/firmware/common/filefuncs.c index 19b8eff612..c31971779d 100644 --- a/firmware/common/filefuncs.c +++ b/firmware/common/filefuncs.c | |||
@@ -61,9 +61,9 @@ bool file_exists(const char *file) | |||
61 | int fd; | 61 | int fd; |
62 | 62 | ||
63 | #ifdef DEBUG | 63 | #ifdef DEBUG |
64 | if (!file || strlen(file) <= 0) | 64 | if (!file || !*file) |
65 | { | 65 | { |
66 | DEBUGF("%s(): Invalid parameter!\n"); | 66 | DEBUGF("%s(%p): Invalid parameter!\n", __func__, file); |
67 | return false; | 67 | return false; |
68 | } | 68 | } |
69 | #endif | 69 | #endif |