diff options
author | Rob Austein <sra@hactrn.net> | 2016-06-30 22:53:08 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-06-30 22:53:08 -0400 |
commit | 57a33b0e84d7977ed531982604236ccb9daa9495 (patch) | |
tree | 9324f4c58218287c5215bcc23b178375d7e27ac3 /xdr.c | |
parent | 3ed08b68d4d4bd51d85334aa1a21690737b95cfe (diff) | |
parent | 3ba7ca4155c7be439108b174a3b49a508923d378 (diff) |
Merge branch 'master' into macosx.
Diffstat (limited to 'xdr.c')
-rw-r--r-- | xdr.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -75,6 +75,17 @@ hal_error_t hal_xdr_decode_int(const uint8_t ** const inbuf, const uint8_t * con return HAL_OK; } +/* Undo the last decode_int - roll back the input pointer. + */ +hal_error_t hal_xdr_undecode_int(const uint8_t ** const inbuf) +{ + if (inbuf == NULL || *inbuf == NULL) + return HAL_ERROR_BAD_ARGUMENTS; + + *inbuf -= sizeof(uint32_t); + return HAL_OK; +} + /* encode/decode_buffer. This covers variable-length string and opaque types. * The data is preceded by a 4-byte length word (encoded as above), and padded * to a multiple of 4 bytes as necessary. |