diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-09-17 18:11:46 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-09-17 18:47:33 +0200 |
commit | 4bd16463b84efb13ce5fb35add284e284b0fd819 (patch) | |
tree | cfc82d3809a94065c8e00a70697a75f8be762580 /ssl/packet_locl.h | |
parent | 6e63c142f269c738e3820203ecec6fe74ad4efa0 (diff) |
Remove PACKET_(get|goto)_bookmark
The bookmark API results in a lot of boilerplate error checking that can
be much more easily achieved with a simple struct copy. It also lays the
path for removing the third PACKET field.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/packet_locl.h')
-rw-r--r-- | ssl/packet_locl.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/ssl/packet_locl.h b/ssl/packet_locl.h index 3200c22846..7a72f8e658 100644 --- a/ssl/packet_locl.h +++ b/ssl/packet_locl.h @@ -421,25 +421,6 @@ __owur static inline int PACKET_forward(PACKET *pkt, size_t len) return 1; } -/* Store a bookmark for the current reading position in |*bm| */ -__owur static inline int PACKET_get_bookmark(const PACKET *pkt, size_t *bm) -{ - *bm = pkt->curr - pkt->start; - - return 1; -} - -/* Set the current reading position to the bookmark |bm| */ -__owur static inline int PACKET_goto_bookmark(PACKET *pkt, size_t bm) -{ - if (bm > (size_t)(pkt->end - pkt->start)) - return 0; - - pkt->curr = pkt->start + bm; - - return 1; -} - /* * Stores the total length of the packet we have in the underlying buffer in * |*len| |