Change in libosmocore[master]: api doc: fix osmo_quote_str_*

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
Fri Sep 7 02:12:21 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/10829


Change subject: api doc: fix osmo_quote_str_*
......................................................................

api doc: fix osmo_quote_str_*

Change-Id: Ibfd8ff213630e34009936b0fcb3ee50dda65fb70
---
M src/utils.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/10829/1

diff --git a/src/utils.c b/src/utils.c
index ea0bbde..3f40f2e 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -557,8 +557,8 @@
 /*! Like osmo_escape_str(), but returns double-quotes around a string, or "NULL" for a NULL string.
  * This allows passing any char* value and get its C representation as string.
  * \param[in] str  A string that may contain any characters.
- * \param[in] len  Pass -1 to print until nul char, or >= 0 to force a length.
- * \returns buf containing an escaped representation, possibly truncated, or str itself.
+ * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a length.
+ * \returns buf containing a quoted and escaped representation, possibly truncated.
  */
 const char *osmo_quote_str_buf(const char *str, int in_len, char *buf, size_t bufsize)
 {
@@ -587,6 +587,12 @@
 	return buf;
 }
 
+/*! Like osmo_quote_str_buf() but returns the result in a static buffer.
+ * The static buffer is shared with get_value_string() and osmo_escape_str().
+ * \param[in] str  A string that may contain any characters.
+ * \param[in] in_len  Pass -1 to print until nul char, or >= 0 to force a length.
+ * \returns static buffer containing a quoted and escaped representation, possibly truncated.
+ */
 const char *osmo_quote_str(const char *str, int in_len)
 {
 	return osmo_quote_str_buf(str, in_len, namebuf, sizeof(namebuf));

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfd8ff213630e34009936b0fcb3ee50dda65fb70
Gerrit-Change-Number: 10829
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180907/289ed770/attachment.htm>


More information about the gerrit-log mailing list