[MERGED] libosmocore[master]: api doc: get_value_string(): mention composition in static b...

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Jun 13 17:45:52 UTC 2016


Neels Hofmeyr has submitted this change and it was merged.

Change subject: api doc: get_value_string(): mention composition in static buffer
......................................................................


api doc: get_value_string(): mention composition in static buffer

Change-Id: I93dad98711ef69f8a1e196efa029a842a1ff5bd6
Reviewed-on: https://gerrit.osmocom.org/229
Reviewed-by: Harald Welte <laforge at gnumonks.org>
Tested-by: Jenkins Builder
---
M src/utils.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/utils.c b/src/utils.c
index 1c2fc32..e76297f 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -43,6 +43,10 @@
  *  \param[in] vs Array of value_string tuples
  *  \param[in] val Value to be converted
  *  \returns pointer to human-readable string
+ *
+ * If val is found in vs, the array's string entry is returned. Otherwise, an
+ * "unknown" string containing the actual value is composed in a static buffer
+ * that is reused across invocations.
  */
 const char *get_value_string(const struct value_string *vs, uint32_t val)
 {

-- 
To view, visit https://gerrit.osmocom.org/229
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I93dad98711ef69f8a1e196efa029a842a1ff5bd6
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list