Change in osmo-msc[master]: VLR: vlr_subscr_{, msisdn_or_}name: const vsub arg

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/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Jan 9 14:34:34 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/12480 )

Change subject: VLR: vlr_subscr_{,msisdn_or_}name: const vsub arg
......................................................................

VLR: vlr_subscr_{,msisdn_or_}name: const vsub arg

Make the vsub argument of both vlr_subscr_msisdn_or_name()
and vlr_subscr_name() a const.

The LOGVSUBP() macro uses vlr_subscr_name() and will not generate a
warning anymore when used with a const vsub.

Change-Id: If609269191f4df6186d823a2eee14012846328e2
---
M include/osmocom/msc/vlr.h
M src/libvlr/vlr.c
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Max: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 029ef31..b328b70 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -330,8 +330,8 @@
 			uint32_t parent_event_failure);
 
 
-const char *vlr_subscr_name(struct vlr_subscr *vsub);
-const char *vlr_subscr_msisdn_or_name(struct vlr_subscr *vsub);
+const char *vlr_subscr_name(const struct vlr_subscr *vsub);
+const char *vlr_subscr_msisdn_or_name(const struct vlr_subscr *vsub);
 
 #define vlr_subscr_find_by_imsi(vlr, imsi) \
 	_vlr_subscr_find_by_imsi(vlr, imsi, __FILE__, __LINE__)
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 7de78bf..b0e7f79 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -79,7 +79,7 @@
 }
 
 /* return static buffer with printable name of VLR subscriber */
-const char *vlr_subscr_name(struct vlr_subscr *vsub)
+const char *vlr_subscr_name(const struct vlr_subscr *vsub)
 {
 	static char buf[32];
 	if (!vsub)
@@ -98,7 +98,7 @@
 	return buf;
 }
 
-const char *vlr_subscr_msisdn_or_name(struct vlr_subscr *vsub)
+const char *vlr_subscr_msisdn_or_name(const struct vlr_subscr *vsub)
 {
 	if (!vsub || !vsub->msisdn[0])
 		return vlr_subscr_name(vsub);

-- 
To view, visit https://gerrit.osmocom.org/12480
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If609269191f4df6186d823a2eee14012846328e2
Gerrit-Change-Number: 12480
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <stsp at stsp.name>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190109/ec3541e1/attachment.htm>


More information about the gerrit-log mailing list