aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-22 23:39:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-22 23:39:49 +0000
commit4394fa14de48cf7000cd89d87f1b7829616ee7df (patch)
tree859f59cb1982d0cee6d78df48482872d33504d53 /utils
parent2b0e6f4d0e0582006c172867df93121755201e66 (diff)
downloadrspamd-4394fa14de48cf7000cd89d87f1b7829616ee7df.tar.gz
rspamd-4394fa14de48cf7000cd89d87f1b7829616ee7df.zip
Fix some more issues found by coverity
Diffstat (limited to 'utils')
-rw-r--r--utils/rspamd_http_bench.c6
-rw-r--r--utils/rspamd_http_server.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c
index 8007d891b..c9a752243 100644
--- a/utils/rspamd_http_bench.c
+++ b/utils/rspamd_http_bench.c
@@ -141,10 +141,10 @@ rspamd_http_client_func (struct event_base *ev_base, struct lat_elt *latency,
struct client_cbdata *cb;
gint fd, flags;
- g_assert (
- (fd = rspamd_inet_address_connect (addr, SOCK_STREAM, TRUE)) != -1);
+ fd = rspamd_inet_address_connect (addr, SOCK_STREAM, TRUE);
+ g_assert (fd != -1);
flags = 1;
- setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags));
+ (void)setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags));
conn = rspamd_http_connection_new (rspamd_client_body, rspamd_client_err,
rspamd_client_finish, RSPAMD_HTTP_CLIENT_SIMPLE,
RSPAMD_HTTP_CLIENT, c);
diff --git a/utils/rspamd_http_server.c b/utils/rspamd_http_server.c
index f861b8a1f..ad01085df 100644
--- a/utils/rspamd_http_server.c
+++ b/utils/rspamd_http_server.c
@@ -191,8 +191,8 @@ rspamd_http_start_servers (pid_t *sfd, rspamd_inet_addr_t *addr)
guint i;
gint fd;
- g_assert (
- (fd = rspamd_inet_address_listen (addr, SOCK_STREAM, TRUE)) != -1);
+ fd = rspamd_inet_address_listen (addr, SOCK_STREAM, TRUE);
+ g_assert (fd != -1);
for (i = 0; i < nworkers; i++) {
sfd[i] = fork ();