rspro_client_fsm: Fix uninitialized return variable use

rspro_client_fsm.c:180:9: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  180 |  return rc;
      |         ^~

Change-Id: I64b275b06b2aa40bd7c6e1dd42afba5ffebd7b00
changes/96/16596/1
Harald Welte 3 years ago
parent 071892974a
commit 9cdd094516
  1. 4
      src/rspro_client_fsm.c

@ -162,8 +162,10 @@ static int srvc_read_cb(struct ipa_client_conn *conn, struct msgb *msg)
case IPAC_PROTO_EXT_RSPRO:
LOGPFSM(srvc->fi, "Received RSPRO %s\n", msgb_hexdump(msg));
pdu = rspro_dec_msg(msg);
if (!pdu)
if (!pdu) {
rc = -EIO;
break;
}
rc = srvc->handle_rx(srvc, pdu);
ASN_STRUCT_FREE(asn_DEF_RsproPDU, pdu);
break;

Loading…
Cancel
Save