summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3-decode.h
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/xdelta3-decode.h')
-rw-r--r--xdelta3/xdelta3-decode.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/xdelta3/xdelta3-decode.h b/xdelta3/xdelta3-decode.h
index 0b49fb9..8e3e799 100644
--- a/xdelta3/xdelta3-decode.h
+++ b/xdelta3/xdelta3-decode.h
@@ -85,7 +85,7 @@ xd3_decode_setup_buffers (xd3_stream *stream)
85 85
86 stream->space_out = xd3_round_blksize (stream->dec_tgtlen, XD3_ALLOCSIZE); 86 stream->space_out = xd3_round_blksize (stream->dec_tgtlen, XD3_ALLOCSIZE);
87 87
88 if ((stream->dec_buffer = xd3_alloc (stream, stream->space_out, 1)) == NULL) 88 if ((stream->dec_buffer = (uint8_t*) xd3_alloc (stream, stream->space_out, 1)) == NULL)
89 { 89 {
90 return ENOMEM; 90 return ENOMEM;
91 } 91 }
@@ -118,7 +118,7 @@ xd3_decode_allocate (xd3_stream *stream,
118 { 118 {
119 *buf_alloc = xd3_round_blksize (size, XD3_ALLOCSIZE); 119 *buf_alloc = xd3_round_blksize (size, XD3_ALLOCSIZE);
120 120
121 if ((*buf_ptr = xd3_alloc (stream, *buf_alloc, 1)) == NULL) 121 if ((*buf_ptr = (uint8_t*) xd3_alloc (stream, *buf_alloc, 1)) == NULL)
122 { 122 {
123 return ENOMEM; 123 return ENOMEM;
124 } 124 }
@@ -805,7 +805,8 @@ xd3_decode_input (xd3_stream *stream)
805 { 805 {
806 /* Get the code table data. */ 806 /* Get the code table data. */
807 if ((stream->dec_codetbl == NULL) && 807 if ((stream->dec_codetbl == NULL) &&
808 (stream->dec_codetbl = xd3_alloc (stream, stream->dec_codetblsz, 1)) == NULL) { return ENOMEM; } 808 (stream->dec_codetbl =
809 (uint8_t*) xd3_alloc (stream, stream->dec_codetblsz, 1)) == NULL) { return ENOMEM; }
809 810
810 if ((ret = xd3_decode_bytes (stream, stream->dec_codetbl, & stream->dec_codetblbytes, stream->dec_codetblsz))) 811 if ((ret = xd3_decode_bytes (stream, stream->dec_codetbl, & stream->dec_codetblbytes, stream->dec_codetblsz)))
811 { 812 {
@@ -840,7 +841,8 @@ xd3_decode_input (xd3_stream *stream)
840 /* Note: we add an additional byte for padding, to allow 841 /* Note: we add an additional byte for padding, to allow
841 0-termination. */ 842 0-termination. */
842 if ((stream->dec_appheader == NULL) && 843 if ((stream->dec_appheader == NULL) &&
843 (stream->dec_appheader = xd3_alloc (stream, stream->dec_appheadsz+1, 1)) == NULL) { return ENOMEM; } 844 (stream->dec_appheader =
845 (uint8_t*) xd3_alloc (stream, stream->dec_appheadsz+1, 1)) == NULL) { return ENOMEM; }
844 846
845 stream->dec_appheader[stream->dec_appheadsz] = 0; 847 stream->dec_appheader[stream->dec_appheadsz] = 0;
846 848