Improve dead code elimination

This commit is contained in:
Justine Tunney 2021-02-08 04:04:42 -08:00
parent 760db8c5ad
commit 0e36cb3ac4
6606 changed files with 9685 additions and 9854 deletions

View file

@ -112,17 +112,19 @@ static int __zipos_load(struct Zipos *zipos, size_t cf, unsigned flags,
errno = EIO;
h->mem = NULL;
}
if (h->mem && (fd = __ensurefds(dup(zipos->fd))) != -1) {
h->handle = g_fds.p[fd].handle;
g_fds.p[fd].kind = kFdZip;
g_fds.p[fd].handle = (intptr_t)h;
g_fds.p[fd].flags = flags;
return fd;
} else {
free(h->freeme);
free(h);
return -1;
if (h->mem) {
if (__ensurefds((fd = dup(zipos->fd))) != -1) {
h->handle = g_fds.p[fd].handle;
g_fds.p[fd].kind = kFdZip;
g_fds.p[fd].handle = (intptr_t)h;
g_fds.p[fd].flags = flags;
return fd;
}
close(fd);
}
free(h->freeme);
free(h);
return -1;
}
/**