This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/18037 )
Change subject: make osmo_cni_peer_id_cmp() NULL safe
......................................................................
make osmo_cni_peer_id_cmp() NULL safe
Related: coverity CID#210172
Change-Id: I400b23ac3f0eb68d5e4c757ea02d130fbe12f80b
---
M src/gsupclient/cni_peer_id.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/src/gsupclient/cni_peer_id.c b/src/gsupclient/cni_peer_id.c
index de7b4bc..ab36959 100644
--- a/src/gsupclient/cni_peer_id.c
+++ b/src/gsupclient/cni_peer_id.c
@@ -154,6 +154,12 @@
int osmo_cni_peer_id_cmp(const struct osmo_cni_peer_id *a, const struct osmo_cni_peer_id *b)
{
+ if (a == b)
+ return 0;
+ if (!a)
+ return -1;
+ if (!b)
+ return 1;
if (a->type != b->type)
return OSMO_CMP(a->type, b->type);
switch (a->type) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/18037
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I400b23ac3f0eb68d5e4c757ea02d130fbe12f80b
Gerrit-Change-Number: 18037
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200505/8ece07b5/attachment.htm>