summaryrefslogtreecommitdiffstats
path: root/test/packettest.c
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2015-09-17 21:28:07 +0200
committerEmilia Kasper <emilia@openssl.org>2015-09-22 20:42:18 +0200
commit6a12a5740b338437cc39480452c1282d0298325d (patch)
tree5c5cfacef1f19ecf09c9cd3706ad3d2c60f5ca60 /test/packettest.c
parentRemove ssl_put_cipher_by_char (diff)
downloadopenssl-6a12a5740b338437cc39480452c1282d0298325d.tar.xz
openssl-6a12a5740b338437cc39480452c1282d0298325d.zip
PACKET: simplify
Get rid of the third field that is no longer needed. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/packettest.c')
-rw-r--r--test/packettest.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/test/packettest.c b/test/packettest.c
index fcae19fe6d..6ee2ab15a6 100644
--- a/test/packettest.c
+++ b/test/packettest.c
@@ -312,20 +312,13 @@ static int test_PACKET_forward(unsigned char buf[BUF_LEN])
static int test_PACKET_buf_init()
{
unsigned char buf[BUF_LEN];
- size_t len;
PACKET pkt;
/* Also tests PACKET_get_len() */
if ( !PACKET_buf_init(&pkt, buf, 4)
- || !PACKET_length(&pkt, &len)
- || len != 4
+ || PACKET_remaining(&pkt) != 4
|| !PACKET_buf_init(&pkt, buf, BUF_LEN)
- || !PACKET_length(&pkt, &len)
- || len != BUF_LEN
- || pkt.end - pkt.start != BUF_LEN
- || pkt.end < pkt.start
- || pkt.curr < pkt.start
- || pkt.curr > pkt.end
+ || PACKET_remaining(&pkt) != BUF_LEN
|| PACKET_buf_init(&pkt, buf, -1)) {
fprintf(stderr, "test_PACKET_buf_init() failed\n");
return 0;