mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Minor fixes.
This commit is contained in:
parent
772fbf602e
commit
1e88273ffc
2
runzip.c
2
runzip.c
|
|
@ -179,7 +179,7 @@ static i64 runzip_chunk(int fd_in, int fd_out, int fd_hist, i64 expected_size, i
|
|||
if (ofs == -1)
|
||||
fatal("Failed to seek input file in runzip_fd\n");
|
||||
|
||||
if (fstat(fd_in, &st) != 0 || st.st_size-ofs == 0)
|
||||
if (fstat(fd_in, &st) != 0 || st.st_size - ofs == 0)
|
||||
return 0;
|
||||
|
||||
ss = open_stream_in(fd_in, NUM_STREAMS);
|
||||
|
|
|
|||
7
stream.c
7
stream.c
|
|
@ -831,10 +831,11 @@ static int fill_buffer(struct stream_info *sinfo, int stream)
|
|||
sinfo->total_read += header_length;
|
||||
|
||||
if (sinfo->s[stream].buf)
|
||||
free(sinfo->s[stream].buf);
|
||||
sinfo->s[stream].buf = malloc(u_len);
|
||||
sinfo->s[stream].buf = realloc(sinfo->s[stream].buf, u_len);
|
||||
else
|
||||
sinfo->s[stream].buf = malloc(u_len);
|
||||
if (!sinfo->s[stream].buf)
|
||||
return -1;
|
||||
fatal("Unable to malloc buffer of size %lld in fill_buffer\n", u_len);
|
||||
if (read_buf(sinfo->fd, sinfo->s[stream].buf, c_len) != 0)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue