Skip to content
Commit 0ae7812f authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

net: dns_sd: Prevent dead code in query parsing



The number of buffer provided was verified in the final else block of a
long validation sequence. It would never be executed though, as one of
the conditions before would always evaluate to true.

As the number of buffers provided verification appears to be significant
in this case, as the buffers are referenced during other validations,
move this check at the beginning of the sequence instead. This also
eliminates the dead-code problem.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 40312a85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment