From 6aa20eee29846fd86b2ac9c79948d466794cfe68 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 6 Dec 2018 00:40:37 +0100 Subject: api doc: gsm48_mi_to_string(): warn of return value implementation Change-Id: If5e7abd15dddf39cdfad8071f4cd5ca8244eabe0 --- src/gsm/gsm48.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index ae9a1cf6..e684a3ca 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -643,7 +643,10 @@ int gsm48_generate_mid_from_imsi(uint8_t *buf, const char *imsi) * \param[in] str_len Length of \a string in bytes * \param[in] mi Mobile Identity to be stringified * \param[in] mi_len Length of \a mi in bytes - * \returns length of string written to \a string */ + * \returns WARNING: the return value of this function is not well implemented. + * Depending on the MI type and amount of output buffer, this may return + * the nr of written bytes, or the written strlen(), or the snprintf() + * style strlen()-if-the-buffer-were-large-enough. */ int gsm48_mi_to_string(char *string, const int str_len, const uint8_t *mi, const int mi_len) { -- cgit v1.2.3