From: brarcher Date: Mon, 23 Jun 2014 04:13:44 +0000 (+0000) Subject: Pass in proper arguments for upack in test_pack_abuse X-Git-Tag: 0.10.0~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cab65e55da00250b5b998ffb40d4e7712be9c63d;p=check Pass in proper arguments for upack in test_pack_abuse Even those the test 'abuses' upack, passing in a non-pointer to a pointer argument is a bad idea. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1164 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/check_check_pack.c b/tests/check_check_pack.c index afadaaa..596d40e 100644 --- a/tests/check_check_pack.c +++ b/tests/check_check_pack.c @@ -138,6 +138,7 @@ START_TEST(test_pack_abuse) { char *buf; CtxMsg cmsg; + enum ck_msg_type type; /* Should report -1 (e.g. invalid) if no buffer is passed */ ck_assert_int_eq(pack(CK_MSG_CTX, NULL, (CheckMsg *) &cmsg), -1); @@ -146,7 +147,7 @@ START_TEST(test_pack_abuse) ck_assert_int_eq(pack(CK_MSG_CTX, &buf, NULL), 0); /* Should report -1 (e.g. invalid) if no buffer is passed */ - ck_assert_int_eq(upack(NULL, (CheckMsg *) &cmsg, CK_MSG_CTX), -1); + ck_assert_int_eq(upack(NULL, (CheckMsg *) &cmsg, &type), -1); } END_TEST