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/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c
index 79e136d..d153247 100644
--- a/openbsc/src/libmsc/ctrl_commands.c
+++ b/openbsc/src/libmsc/ctrl_commands.c
@@ -20,6 +20,7 @@
  */
 
 #include <osmocom/ctrl/control_cmd.h>
+#include <osmocom/core/utils.h>
 #include <openbsc/gsm_data.h>
 #include <openbsc/gsm_subscriber.h>
 #include <openbsc/db.h>
@@ -103,8 +104,7 @@
 		goto fail;
 
 	subscr->authorized = 1;
-	strncpy(subscr->extension, msisdn, GSM_EXTENSION_LENGTH - 1);
-	subscr->extension[GSM_EXTENSION_LENGTH-1] = '\0';
+	osmo_strlcpy(subscr->extension, msisdn, sizeof(subscr->extension));
 
 	/* put it back to the db */
 	rc = db_sync_subscriber(subscr);