am7xxx-play: fix a possible case of use before initialization
authorAntonio Ospite <ao2@ao2.it>
Sat, 22 Nov 2014 22:58:36 +0000 (23:58 +0100)
committerAntonio Ospite <ao2@ao2.it>
Sat, 22 Nov 2014 22:58:36 +0000 (23:58 +0100)
commit478203de36f03a4889699e193bd81d7fb4afbcd7
treef7db20400c973b4f9084e94e46ecc970a3d670c9
parent5a4223cd1d722e92018b1e8ebec486e89fb200b5
am7xxx-play: fix a possible case of use before initialization

The got_packet variable is assigned inside an internal "if" of the while
loop, but it is also used in the checks at the end of the while loop,
and it is possible to get to this part before having ever assigned the
variable, so in order to behave correctly initialize the variable before
the loop starts.
examples/am7xxx-play.c