From: schwarze Date: Mon, 12 Oct 2015 21:16:32 +0000 (+0000) Subject: Garbage collect an unused variable, no functional change; X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6cd1169660cad7b57f721f54f70f01080e8f1062;p=openbsd Garbage collect an unused variable, no functional change; found by Svyatoslav Mishyn with cppcheck. --- diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 809ad999bce..ecf80a6e4cf 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandocdb.c,v 1.153 2015/10/12 00:32:37 schwarze Exp $ */ +/* $OpenBSD: mandocdb.c,v 1.154 2015/10/12 21:16:32 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -1237,7 +1237,6 @@ names_check(void) { sqlite3_stmt *stmt; const char *name, *sec, *arch, *key; - int irc; sqlite3_prepare_v2(db, "SELECT name, sec, arch, key FROM (" @@ -1253,10 +1252,10 @@ names_check(void) ") USING (pageid);", -1, &stmt, NULL); - if (SQLITE_OK != sqlite3_bind_int64(stmt, 1, NAME_TITLE)) + if (sqlite3_bind_int64(stmt, 1, NAME_TITLE) != SQLITE_OK) say("", "%s", sqlite3_errmsg(db)); - while (SQLITE_ROW == (irc = sqlite3_step(stmt))) { + while (sqlite3_step(stmt) == SQLITE_ROW) { name = (const char *)sqlite3_column_text(stmt, 0); sec = (const char *)sqlite3_column_text(stmt, 1); arch = (const char *)sqlite3_column_text(stmt, 2);