diff options
-rw-r--r-- | kbfunc.c | 4 | ||||
-rw-r--r-- | search.c | 4 | ||||
-rw-r--r-- | xevents.c | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -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) { @@ -97,7 +97,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) continue; /* Current window is ranked down. */ - if ((tier < nitems(tierp) - 1) && (cc->flags & CLIENT_ACTIVE)) + if (((unsigned)tier < nitems(tierp) - 1) && (cc->flags & CLIENT_ACTIVE)) tier++; /* Hidden window is ranked up. */ @@ -160,7 +160,7 @@ match_path_type(struct menu_q *resultq, char *search, int flag) struct menu *mi; char *pattern; glob_t g; - int i; + size_t i; xasprintf(&pattern, "%s*", search); if (glob(pattern, GLOB_MARK, NULL, &g) != 0) @@ -410,7 +410,7 @@ xev_handle_clientmessage(XEvent *ee) * is 0xFFFFFFFF (-1) then the window should appear * on all desktops, in our case, group 0. */ - if (e->data.l[0] == (unsigned long)-1) + if (e->data.l[0] == 0xFFFFFFFF) group_movetogroup(cc, 0); else if (e->data.l[0] >= 0 && |