summaryrefslogtreecommitdiffstats
path: root/unit
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-06-07 12:08:23 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-06-09 12:19:52 -0500
commitef408ae1a65be6986c3468e9319be4c3a7028c61 (patch)
tree268d64dc03083b9ed1513d63a4d036d08df7eb93 /unit
parent1d8bb1bab67562ec68cef09429894e9916b4cb53 (diff)
downloadofono-ef408ae1a65be6986c3468e9319be4c3a7028c61.tar.bz2
stkutil: Use static buf in stk_pdu_from_response
Diffstat (limited to 'unit')
-rw-r--r--unit/test-stkutil.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index fb354bda..eb50d173 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -13949,13 +13949,18 @@ struct terminal_response_test {
static void test_terminal_response_encoding(gconstpointer data)
{
const struct terminal_response_test *test = data;
- unsigned char buf[512];
- unsigned int len;
+ const unsigned char *pdu;
+ unsigned int pdu_len;
- len = stk_pdu_from_response(&test->response, buf, sizeof(buf));
+ pdu = stk_pdu_from_response(&test->response, &pdu_len);
+
+ if (test->pdu)
+ g_assert(pdu);
+ else
+ g_assert(pdu == NULL);
- g_assert(len == test->pdu_len);
- g_assert(memcmp(buf, test->pdu, len) == 0);
+ g_assert(pdu_len == test->pdu_len);
+ g_assert(memcmp(pdu, test->pdu, pdu_len) == 0);
}
static const unsigned char display_text_response_111[] = {