cosmetic: use osmo_strlcpy() everywhere
Shorten some code and make obvious to the reader that the string copy is done
in a safe way.
Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd
diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c
index 4b69a0d..1fa7fc4 100644
--- a/openbsc/src/gprs/sgsn_auth.c
+++ b/openbsc/src/gprs/sgsn_auth.c
@@ -20,6 +20,7 @@
*/
#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
+#include <osmocom/core/utils.h>
#include <openbsc/sgsn.h>
#include <openbsc/gprs_sgsn.h>
#include <openbsc/gprs_gmm.h>
@@ -62,7 +63,7 @@
acl = talloc_zero(NULL, struct imsi_acl_entry);
if (!acl)
return -ENOMEM;
- strncpy(acl->imsi, imsi, sizeof(acl->imsi) - 1);
+ osmo_strlcpy(acl->imsi, imsi, sizeof(acl->imsi));
llist_add(&acl->list, &cfg->imsi_acl);