aboutsummaryrefslogtreecommitdiffstats
path: root/kbfunc.c
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-03-18 19:47:57 +0100
committerWolfgang Müller2021-04-27 12:28:35 +0200
commit03b67742f6e3939ceae5f9587c60391d35259f6d (patch)
tree53632f4fd8eab5f70976d88b2550c9022eecec78 /kbfunc.c
parent13377b4e34be6d298eeb41a55df939f39ee7f5a7 (diff)
downloadcwm-03b67742f6e3939ceae5f9587c60391d35259f6d.tar.gz
Fix several sign-compare warnings
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kbfunc.c b/kbfunc.c
index c68aa8c..a58a9ac 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -626,7 +626,9 @@ kbfunc_menu_exec(void *ctx, struct cargs *cargs)
(void)memset(tpath, '\0', sizeof(tpath));
l = snprintf(tpath, sizeof(tpath), "%s/%s", paths[i],
dp->d_name);
- if (l == -1 || l >= sizeof(tpath))
+ if (l < 0)
+ continue;
+ if ((unsigned)l >= sizeof(tpath))
continue;
/* Skip everything but regular files and symlinks. */
if (dp->d_type != DT_REG && dp->d_type != DT_LNK) {