mirror of https://git.tukaani.org/xz.git
Avoid variable-length arrays in the debug programs.
This commit is contained in:
parent
72f7307cfd
commit
3e8bd1d15e
|
@ -14,6 +14,8 @@
|
||||||
#include "lzma.h"
|
#include "lzma.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define CHUNK 64
|
||||||
|
|
||||||
|
|
||||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||||
static FILE *file_in;
|
static FILE *file_in;
|
||||||
|
@ -22,7 +24,6 @@ static FILE *file_in;
|
||||||
static void
|
static void
|
||||||
encode(size_t size, lzma_action action)
|
encode(size_t size, lzma_action action)
|
||||||
{
|
{
|
||||||
static const size_t CHUNK = 64;
|
|
||||||
uint8_t in[CHUNK];
|
uint8_t in[CHUNK];
|
||||||
uint8_t out[CHUNK];
|
uint8_t out[CHUNK];
|
||||||
lzma_ret ret;
|
lzma_ret ret;
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include "lzma.h"
|
#include "lzma.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define CHUNK 64
|
||||||
|
|
||||||
|
|
||||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||||
static FILE *file_in;
|
static FILE *file_in;
|
||||||
|
@ -22,7 +24,6 @@ static FILE *file_in;
|
||||||
static void
|
static void
|
||||||
encode(size_t size, lzma_action action)
|
encode(size_t size, lzma_action action)
|
||||||
{
|
{
|
||||||
static const size_t CHUNK = 64;
|
|
||||||
uint8_t in[CHUNK];
|
uint8_t in[CHUNK];
|
||||||
uint8_t out[CHUNK];
|
uint8_t out[CHUNK];
|
||||||
lzma_ret ret;
|
lzma_ret ret;
|
||||||
|
|
Loading…
Reference in New Issue