cosmetic: protocol: remove unnecessary nul termination
Adding a NUL manually is a common idiom after calling strncpy() because
strncpy() does not always NUL-terminate the string. But snprintf() is
fine.
- remove NUL termination after snprintf in mgcp_send_reset_ep()
Change-Id: I5a1187b13b21b11674f13d3449c730616b0a4ddf
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 5f1a734..4c04712 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1242,8 +1242,6 @@
if (len < 0)
return -1;
- buf[sizeof(buf) - 1] = '\0';
-
rc = send_agent(endp->cfg, buf, len);
if (rc <= 0)
return -1;