summary refs log tree commit diff
path: root/menu.c
diff options
context:
space:
mode:
authorokan <okan>2011-07-25 15:10:24 +0000
committerokan <okan>2011-07-25 15:10:24 +0000
commitf51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0 (patch)
tree1fc947a7565944bf2613155ca188c7fda3cbff3c /menu.c
parent69ac0624cc07ffc8df11287a8827b42773371b0e (diff)
downloadcwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.tar.gz
cwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.tar.xz
cwm-f51f3cb9c2b39f728f2708d7ab798ecaf1cebaf0.zip
We are inconsistent when it comes to function returns, so just go all
the way with the cwm specific parts.

ok oga@
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/menu.c b/menu.c
index 83de6b6..308358f 100644
--- a/menu.c
+++ b/menu.c
@@ -118,16 +118,16 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
 		mc.list = 1;
 	} else {
 		evmask = MENUMASK | KEYMASK; /* only accept keys if prompt */
-		snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s", prompt,
-		    PROMPT_SCHAR);
-		snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s", mc.promptstr,
-		    mc.searchstr, PROMPT_ECHAR);
+		(void)snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s",
+		    prompt, PROMPT_SCHAR);
+		(void)snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s",
+		    mc.promptstr, mc.searchstr, PROMPT_ECHAR);
 		mc.width = font_width(sc, mc.dispstr, strlen(mc.dispstr));
 		mc.hasprompt = 1;
 	}
 
 	if (initial != NULL)
-		strlcpy(mc.searchstr, initial, sizeof(mc.searchstr));
+		(void)strlcpy(mc.searchstr, initial, sizeof(mc.searchstr));
 	else
 		mc.searchstr[0] = '\0';
 
@@ -268,7 +268,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
 		str[0] = chr;
 		str[1] = '\0';
 		mc->changed = 1;
-		strlcat(mc->searchstr, str, sizeof(mc->searchstr));
+		(void)strlcat(mc->searchstr, str, sizeof(mc->searchstr));
 	}
 
 	mc->noresult = 0;
@@ -312,7 +312,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq,
 	mc->width = 0;
 	dy = 0;
 	if (mc->hasprompt) {
-		snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s",
+		(void)snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s",
 		    mc->promptstr, mc->searchstr, PROMPT_ECHAR);
 		mc->width = font_width(sc, mc->dispstr, strlen(mc->dispstr));
 		dy = font_height(sc);
@@ -405,11 +405,11 @@ menu_handle_move(XEvent *e, struct menu_ctx *mc, struct screen_ctx *sc)
 		XFillRectangle(X_Dpy, sc->menuwin, sc->gc, 0,
 		    font_height(sc) * mc->prev, mc->width, font_height(sc));
 	if (mc->entry != -1) {
-		xu_ptr_regrab(MENUGRABMASK, Cursor_normal);
+		(void)xu_ptr_regrab(MENUGRABMASK, Cursor_normal);
 		XFillRectangle(X_Dpy, sc->menuwin, sc->gc, 0,
 		    font_height(sc) * mc->entry, mc->width, font_height(sc));
 	} else
-		xu_ptr_regrab(MENUGRABMASK, Cursor_default);
+		(void)xu_ptr_regrab(MENUGRABMASK, Cursor_default);
 }
 
 static struct menu *