mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
lzma: Tidy up the function prototype
This should use a const pointer for the input stream. Fix this and also add a proper comment. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
423cf0acda
commit
ccfc9d7841
2 changed files with 17 additions and 4 deletions
|
@ -37,8 +37,8 @@
|
||||||
static void *SzAlloc(void *p, size_t size) { return malloc(size); }
|
static void *SzAlloc(void *p, size_t size) { return malloc(size); }
|
||||||
static void SzFree(void *p, void *address) { free(address); }
|
static void SzFree(void *p, void *address) { free(address); }
|
||||||
|
|
||||||
int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
|
int lzmaBuffToBuffDecompress(unsigned char *outStream, SizeT *uncompressedSize,
|
||||||
unsigned char *inStream, SizeT length)
|
const unsigned char *inStream, SizeT length)
|
||||||
{
|
{
|
||||||
int res = SZ_ERROR_DATA;
|
int res = SZ_ERROR_DATA;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -13,6 +13,19 @@
|
||||||
|
|
||||||
#include <lzma/LzmaTypes.h>
|
#include <lzma/LzmaTypes.h>
|
||||||
|
|
||||||
extern int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
|
/**
|
||||||
unsigned char *inStream, SizeT length);
|
* lzmaBuffToBuffDecompress() - Decompress LZMA data
|
||||||
|
*
|
||||||
|
* @outStream: output buffer
|
||||||
|
* @uncompressedSize: On entry, the mnaximum uncompressed size of the data;
|
||||||
|
* on exit, the actual uncompressed size after processing
|
||||||
|
* @inStream: Compressed bytes to decompress
|
||||||
|
* @length: Sizeof @inStream
|
||||||
|
* @return 0 if OK, SZ_ERROR_DATA if the data is in a format that cannot be
|
||||||
|
* decompressed; SZ_ERROR_OUTPUT_EOF if *uncompressedSize is too small;
|
||||||
|
* see also other SZ_ERROR... values
|
||||||
|
*/
|
||||||
|
int lzmaBuffToBuffDecompress(unsigned char *outStream, SizeT *uncompressedSize,
|
||||||
|
const unsigned char *inStream, SizeT length);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue