Lines Matching refs:obuf
65 unsigned char *ibuf, *obuf; in test_to_from_buf_1() local
74 obuf = g_malloc(sz + 8) + 4; in test_to_from_buf_1()
75 memcpy(obuf-4, "xxxx", 4); memcpy(obuf + sz, "yyyy", 4); in test_to_from_buf_1()
97 memset(obuf + i, 0, sz - i); in test_to_from_buf_1()
99 n = iov_to_buf(iov, niov, i, obuf + i, sz - i); in test_to_from_buf_1()
103 g_assert(memcmp(ibuf, obuf, sz) == 0); in test_to_from_buf_1()
106 n = iov_to_buf(iov, niov, i, obuf + i, 1); in test_to_from_buf_1()
109 g_assert(obuf[i] == (i & 255)); in test_to_from_buf_1()
125 memset(obuf + i, 0, j - i); in test_to_from_buf_1()
128 n = iov_to_buf(iov, niov, i, obuf + i, j - i); in test_to_from_buf_1()
132 g_assert(memcmp(ibuf, obuf, sz) == 0); in test_to_from_buf_1()
140 g_assert(!memcmp(obuf-4, "xxxx", 4) && !memcmp(obuf+sz, "yyyy", 4)); in test_to_from_buf_1()
141 g_free(obuf-4); in test_to_from_buf_1()