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
This commit is contained in:
Philipp Maier
2018-01-19 10:16:54 +01:00
parent 12943ea0c1
commit 2138779559

View File

@@ -1242,8 +1242,6 @@ int mgcp_send_reset_ep(struct mgcp_endpoint *endp, int endpoint)
if (len < 0) if (len < 0)
return -1; return -1;
buf[sizeof(buf) - 1] = '\0';
rc = send_agent(endp->cfg, buf, len); rc = send_agent(endp->cfg, buf, len);
if (rc <= 0) if (rc <= 0)
return -1; return -1;