summaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-13 13:16:58 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-13 17:45:52 +0000
commit8a3c83ed00104bdb326c160a36c8f2b0625eeabd (patch)
tree909cd6512c5dae432affbf03ece8eb6be885a138 /src/utils.c
parent6cf8eba4ecb560b50faf94c99c2bd6008b97c731 (diff)
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@gnumonks.org> Tested-by: Jenkins Builder
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 1c2fc326..e76297ff 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -43,6 +43,10 @@ static char namebuf[255];
* \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)
{