From 1e870951d7707d45fa7104658a4dde177d9fb62e Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Wed, 19 Aug 2015 15:49:29 -0700 Subject: Refer to a shared definition for max buffered bytes. --- upb/pb/decoder.int.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'upb/pb/decoder.int.h') diff --git a/upb/pb/decoder.int.h b/upb/pb/decoder.int.h index b7e462b..f2bf242 100644 --- a/upb/pb/decoder.int.h +++ b/upb/pb/decoder.int.h @@ -218,11 +218,8 @@ struct upb_pbdecoder { /* Overall stream offset of "buf." */ uint64_t bufstart_ofs; - /* Buffer for residual bytes not parsed from the previous buffer. - * The maximum number of residual bytes we require is 12; a five-byte - * unknown tag plus a ten-byte value, less one because the value - * is only a partial value. */ - char residual[14]; + /* Buffer for residual bytes not parsed from the previous buffer. */ + char residual[UPB_DECODER_MAX_RESIDUAL_BYTES]; char *residual_end; /* Bytes of data that should be discarded from the input beore we start -- cgit v1.2.3