diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-11 17:19:18 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-18 19:03:44 +0100 |
commit | d93c84f96e7b7e652ac5a937c1f27df0913fca18 (patch) | |
tree | 4c91465c51b135410dcda6f4d76a12f6ba43e426 /tests/mgcp | |
parent | e6caed12caa117de4d28111d9302d542963b1836 (diff) |
misc: Address warnings coming from clang
* Include stdlib.h before the snmp headers to have a free declaration
* Use sprintf(dest, "%s", str) to avoid format string attacks
* Avoid bogus assignment. This pattern was used for marking something
as unused in the past.
Diffstat (limited to 'tests/mgcp')
-rw-r--r-- | tests/mgcp/mgcp_patch_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mgcp/mgcp_patch_test.c b/tests/mgcp/mgcp_patch_test.c index 68d163d..3153ecd 100644 --- a/tests/mgcp/mgcp_patch_test.c +++ b/tests/mgcp/mgcp_patch_test.c @@ -197,7 +197,7 @@ static struct msgb *create_msg(const char *str) struct msgb *msg; msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, str); + int len = sprintf((char *)msg->data, "%s", str); msg->l2h = msgb_put(msg, len); return msg; } |