Fix syntax error when compiling without zlib

commit ecb5854be0 ("add zlib compression for fast resume") added new
logic selected at compile-time when zlib is present. Unfortunately, it
also broke the existing logic by removing the last line of a multi-line
if statement, resulting in a syntax error when zlib isn't present.

Restore the line as it was.
This commit is contained in:
Thomas Hebb
2024-08-06 11:37:19 -07:00
parent 2e57d86576
commit 9df9064549

View File

@ -2237,7 +2237,6 @@ int main(int argc, char **argv_orig, char **envp) {
snprintf(fn, PATH_MAX, "%s/fastresume.bin", afl->out_dir); snprintf(fn, PATH_MAX, "%s/fastresume.bin", afl->out_dir);
#ifdef HAVE_ZLIB #ifdef HAVE_ZLIB
if ((fr_fd = ZLIBOPEN(fn, "rb")) != NULL) { if ((fr_fd = ZLIBOPEN(fn, "rb")) != NULL) {
#else #else
if ((fr_fd = open(fn, O_RDONLY)) >= 0) { if ((fr_fd = open(fn, O_RDONLY)) >= 0) {
@ -3341,9 +3340,9 @@ stop_fuzzing:
ACTF("Writing %s ...", fr); ACTF("Writing %s ...", fr);
#ifdef HAVE_ZLIB #ifdef HAVE_ZLIB
if ((fr_fd = ZLIBOPEN(fr, "wb9")) != NULL) { if ((fr_fd = ZLIBOPEN(fr, "wb9")) != NULL) {
#else #else
if ((fr_fd = open(fr, O_WRONLY | O_TRUNC | O_CREAT, DEFAULT_PERMISSION)) >= if ((fr_fd = open(fr, O_WRONLY | O_TRUNC | O_CREAT, DEFAULT_PERMISSION)) >=
0) {
#endif #endif
u8 ver_string[8]; u8 ver_string[8];