[PATCH] libosmocore[master]: utils: add osmo_strscpy() macro to use sizeof(dst)

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 Jan 16 13:57:24 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1599

to look at the new patch set (#5).

utils: add osmo_strscpy() macro to use sizeof(dst)

Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022
---
M include/osmocom/core/utils.h
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/1599/5

diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 41bbc27..df93d15 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -88,4 +88,8 @@
 
 size_t osmo_strlcpy(char *dst, const char *src, size_t siz);
 
+/*! \brief Call osmo_strlcpy() with the \a siz arg passed as sizeof(dst). */
+#define osmo_strscpy(dest, src) \
+	osmo_strlcpy(dest, src, sizeof(dest))
+
 /*! @} */

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie973fc51835066540eba7ed2946ddf33a268b022
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list