summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-06-21 21:13:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-06-23 13:34:07 +0200
commit95ec61ecb0bd1aad69b7f387768369c09ff532b4 (patch)
treefba61747d07a63fe2cce753ecad641a8c7711ed9 /lib
parentb5114cf8a1b87219330fba4d3189788d8fc1a8d1 (diff)
downloadbarebox-95ec61ecb0bd1aad69b7f387768369c09ff532b4.tar.gz
barebox-95ec61ecb0bd1aad69b7f387768369c09ff532b4.tar.xz
ratp: avoid unnecessary variable initializations
This is just a cleanup; the variables are completely initialized later on so the initial values are totally discarded anyway. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/ratp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ratp.c b/lib/ratp.c
index 0d384aa4e9..e9536499e2 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -382,7 +382,7 @@ static int ratp_send_ack(struct ratp_internal *ri, struct ratp_header *hdr)
static int ratp_send_next_data(struct ratp_internal *ri)
{
uint16_t crc;
- uint8_t control = RATP_CONTROL_ACK;
+ uint8_t control;
struct ratp_header *hdr;
int pktlen;
struct ratp_message *msg;
@@ -594,7 +594,7 @@ static void ratp_behaviour_b(struct ratp_internal *ri, void *pkt)
if ((hdr->control & RATP_CONTROL_ACK) && !ratp_an_expected(ri, hdr)) {
if (!(hdr->control & RATP_CONTROL_RST)) {
- uint8_t control = RATP_CONTROL_RST;
+ uint8_t control;
control = RATP_CONTROL_RST |
ratp_set_sn(ratp_an(hdr));