mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Fix some static analysis issues
This commit is contained in:
parent
fb54604b31
commit
f147d3dde9
30 changed files with 375 additions and 266 deletions
|
@ -204,7 +204,8 @@ bool Send(int tmpfd, const void *output, size_t outputsize) {
|
|||
static bool once;
|
||||
static z_stream zs;
|
||||
zsize = 32768;
|
||||
zbuf = gc(malloc(zsize));
|
||||
if (!(zbuf = malloc(zsize)))
|
||||
__builtin_trap();
|
||||
if (!once) {
|
||||
CHECK_EQ(Z_OK, deflateInit2(&zs, 4, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
|
||||
Z_DEFAULT_STRATEGY));
|
||||
|
@ -226,6 +227,7 @@ bool Send(int tmpfd, const void *output, size_t outputsize) {
|
|||
break;
|
||||
}
|
||||
} while (!zs.avail_out);
|
||||
free(zbuf);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue