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
Tue Jan 8 11:13:37 UTC 2019


osmith has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/12480/1

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: newchange
Gerrit-Change-Id: If609269191f4df6186d823a2eee14012846328e2
Gerrit-Change-Number: 12480
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190108/11eefd0a/attachment.htm>


More information about the gerrit-log mailing list