Commit 0ae7812
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: Robert Lubos <[email protected]>1 parent 40312a8 commit 0ae7812
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1067 | 1073 | | |
1068 | 1074 | | |
1069 | 1075 | | |
| |||
1120 | 1126 | | |
1121 | 1127 | | |
1122 | 1128 | | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | 1129 | | |
1128 | 1130 | | |
1129 | 1131 | | |
| |||
0 commit comments