From 02915d130c044aa89ceff108b868c705856a35ca Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 25 Jul 2011 15:10:24 +0000 Subject: We are inconsistent when it comes to function returns, so just go all the way with the cwm specific parts. ok oga@ --- search.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'search.c') diff --git a/search.c b/search.c index 79e1015..9db2f70 100644 --- a/search.c +++ b/search.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: search.c,v 1.23 2011/05/11 13:53:51 okan Exp $ + * $OpenBSD: search.c,v 1.24 2011/07/25 15:10:24 okan Exp $ */ #include @@ -46,7 +46,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) TAILQ_INIT(resultq); - memset(tierp, 0, sizeof(tierp)); + (void)memset(tierp, 0, sizeof(tierp)); /* * In order of rank: @@ -134,7 +134,8 @@ search_print_client(struct menu *mi, int list) if (list) cc->matchname = cc->name; - snprintf(mi->print, sizeof(mi->print), "%c%s", flag, cc->matchname); + (void)snprintf(mi->print, sizeof(mi->print), "%c%s", flag, + cc->matchname); if (!list && cc->matchname != cc->name && strlen(mi->print) < sizeof(mi->print) - 1) { @@ -154,8 +155,8 @@ search_print_client(struct menu *mi, int list) diff = strlen(cc->name); } - strlcpy(buf, mi->print, sizeof(buf)); - snprintf(mi->print, sizeof(mi->print), + (void)strlcpy(buf, mi->print, sizeof(buf)); + (void)snprintf(mi->print, sizeof(mi->print), "%s:%.*s%s", buf, diff, cc->name, marker); } } -- cgit v1.2.3-2-gb3c3