pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hlr/+/39006?usp=email )
Change subject: gsup_client: Avoid double memset 0
......................................................................
gsup_client: Avoid double memset 0
Memory is already zeroed during talloc_zero, no need to reset it to
zero.
Change-Id: I66515fc893ffc64a36abedc01a75b57aed7e932d
---
M src/gsupclient/gsup_client.c
1 file changed, 5 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/39006/1
diff --git a/src/gsupclient/gsup_client.c b/src/gsupclient/gsup_client.c
index e7d03f2..36407d5 100644
--- a/src/gsupclient/gsup_client.c
+++ b/src/gsupclient/gsup_client.c
@@ -309,13 +309,11 @@
gsupc = talloc_zero(talloc_ctx, struct osmo_gsup_client);
OSMO_ASSERT(gsupc);
- *gsupc = (struct osmo_gsup_client){
- .unit_name = (const char *)config->ipa_dev->unit_name, /* API backwards compat
*/
- .ipa_dev = config->ipa_dev,
- .read_cb = config->read_cb,
- .up_down_cb = config->up_down_cb,
- .data = config->data,
- };
+ gsupc->unit_name = (const char *)config->ipa_dev->unit_name; /* API backwards
compat */
+ gsupc->ipa_dev = config->ipa_dev;
+ gsupc->read_cb = config->read_cb;
+ gsupc->up_down_cb = config->up_down_cb;
+ gsupc->data = config->data;
/* a NULL oapc_config will mark oap_state disabled. */
rc = osmo_oap_client_init(config->oapc_config, &gsupc->oap_state);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hlr/+/39006?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I66515fc893ffc64a36abedc01a75b57aed7e932d
Gerrit-Change-Number: 39006
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>