+// SPDX-License-Identifier: GPL-2.0+
/*
* Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
*
*
* Copyright (C) 1999-2005 Igor Pavlov
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
#include <config.h>
-#include <common.h>
+#include <log.h>
#include <watchdog.h>
#ifdef CONFIG_LZMA
static void *SzAlloc(void *p, size_t size) { return malloc(size); }
static void SzFree(void *p, void *address) { free(address); }
-int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
- unsigned char *inStream, SizeT length)
+int lzmaBuffToBuffDecompress(unsigned char *outStream, SizeT *uncompressedSize,
+ const unsigned char *inStream, SizeT length)
{
int res = SZ_ERROR_DATA;
int i;
/* Decompress */
outProcessed = min(outSizeFull, *uncompressedSize);
- WATCHDOG_RESET();
+ schedule();
res = LzmaDecode(
outStream, &outProcessed,