diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2021-02-04 11:52:37 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-02-04 14:08:42 +0000 |
commit | ed7bca6b33a4fd5290bd381f8b60188314833a64 (patch) | |
tree | 7880092dfc169c9ed1cf903e1ad8c0b6e01ee8a1 | |
parent | f7c7d2baf6e2b6cd4a295c21040fd4e6c5492bf1 (diff) |
pcu_sock: fix uninitalized returncode value
In function pcu_tx_si_all(), the variable rc is not initalized. If
pcu_tx_si() fails, then rc is populated with value -EINVAL, but if all
si transmissions succeed, which is the normal case, rc remains
uninitalized.
Change-Id: I571fdb4f175fb259b77f989554f569fc2230dfe6
Related: CID#216932
-rw-r--r-- | src/common/pcu_sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 250491f1..ec7f876e 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -771,7 +771,7 @@ static int pcu_tx_si_all(struct gsm_bts *bts) const enum osmo_sysinfo_type si_types[3] = { SYSINFO_TYPE_1, SYSINFO_TYPE_3, SYSINFO_TYPE_13 }; unsigned int i; - int rc; + int rc = 0; for (i = 0; i < ARRAY_SIZE(si_types); i++) { if (GSM_BTS_HAS_SI(bts, si_types[i])) { |