mgcp_client: tweak extract_codec_name() implementation

Instead of calling strlen() for every loop iteration, just use strchr()
to find the position of '/'.

Change-Id: Ifc7302b6c5f9288a622e33c3e8b5fe0e7037dbdc
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 75c7b14..78652a1 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -69,17 +69,16 @@
 static char *extract_codec_name(const char *str)
 {
 	static char buf[64];
-	unsigned int i;
+	char *pos;
 
 	if (!str)
 		return NULL;
 
 	osmo_strlcpy(buf, str, sizeof(buf));
 
-	for (i = 0; i < strlen(buf); i++) {
-		if (buf[i] == '/')
-			buf[i] = '\0';
-	}
+	pos = strchr(buf, '/');
+	if (pos)
+		*pos = '\0';
 
 	return buf;
 }