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
This commit is contained in:
Philippe Teuwen 2013-03-06 00:54:49 +01:00
parent d577fda412
commit c37d1742c3

View file

@ -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;