From 4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 20 Jan 2015 04:36:08 +0100 Subject: Minor fixes and tweaks suggested by cppcheck - Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru --- src/char/int_auction.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/char/int_auction.c') diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 5d42e6398..164ca5360 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -175,7 +175,6 @@ void inter_auctions_fromsql(void) { int i; struct auction_data *auction; - struct item *item; char *data; StringBuf buf; int64 tick = timer->gettick(), endtick; @@ -193,8 +192,8 @@ void inter_auctions_fromsql(void) StrBuf->Destroy(&buf); - while( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) ) - { + while (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) { + struct item *item; CREATE(auction, struct auction_data, 1); SQL->GetData(inter->sql_handle, 0, &data, NULL); auction->auction_id = atoi(data); SQL->GetData(inter->sql_handle, 1, &data, NULL); auction->seller_id = atoi(data); -- cgit v1.2.3-60-g2f50