From c37d1742c3839e08b2595e21855cccf7090003e3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 6 Mar 2013 00:54:49 +0100 Subject: [PATCH] Fix cppcheck style: scope of variable can be reduced Fix the following cppcheck warnings: [libnfc/chips/pn53x.c:617]: (style) The scope of the variable 'res' can be reduced --- libnfc/chips/pn53x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index c961b46..9b5946c 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -614,9 +614,9 @@ int pn53x_write_register(struct nfc_device *pnd, const uint16_t ui16RegisterAddress, const uint8_t ui8SymbolMask, const uint8_t ui8Value) { if ((ui16RegisterAddress < PN53X_CACHE_REGISTER_MIN_ADDRESS) || (ui16RegisterAddress > PN53X_CACHE_REGISTER_MAX_ADDRESS)) { - int res = 0; // Direct write if (ui8SymbolMask != 0xff) { + int res = 0; uint8_t ui8CurrentValue; if ((res = pn53x_read_register(pnd, ui16RegisterAddress, &ui8CurrentValue)) < 0) return res;