Skip to content

Commit

Permalink
http_server.c: fix checks of error return code in http_server_init()
Browse files Browse the repository at this point in the history
  • Loading branch information
DDvO committed Jul 31, 2024
1 parent 93af86b commit 9d26c79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/lib/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ BIO *http_server_init(const char *prog, const char *port, int verb)
goto err;
acbio = BIO_new(BIO_s_accept());
if (acbio == NULL
|| BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) < 0
|| BIO_set_accept_name(acbio, name) < 0) {
|| BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) <= 0
|| BIO_set_accept_name(acbio, name) <= 0) {
log_HTTP(prog, LOG_ERR, "error setting up accept BIO");
goto err;
}
Expand Down

0 comments on commit 9d26c79

Please sign in to comment.