cppcheck: Reduce scope

Change-Id: I341c2b7112f32a0ab0e1a6dfac0ab4679310202c
cppcheck: reduce scope in AvahiNetworkService

Change-Id: Ida14cc278187fdc7519137829a920273ed4910b3
cppcheck: Clarify expression with parenthesis

boolean result used in bitwise operation

Change-Id: I581b681a6f3ba682c7b743928d1b6f397ecf960c