summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ecp/src/ecp/core.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ecp/src/ecp/core.c b/ecp/src/ecp/core.c
index 3063fd2..d666d32 100644
--- a/ecp/src/ecp/core.c
+++ b/ecp/src/ecp/core.c
@@ -75,13 +75,10 @@ ECPConnHandler *ecp_ctx_get_handler(ECPContext *ctx, unsigned char ctype) {
}
int ecp_addr_init(ecp_tr_addr_t *addr, void *addr_s) {
- int rv = ECP_OK;
+ int rv;
memset(addr, 0, sizeof(ecp_tr_addr_t));
- if (addr_s) {
- rv = ecp_tr_addr_set(addr, addr_s);
- }
-
+ rv = ecp_tr_addr_set(addr, addr_s);
return rv;
}
@@ -111,9 +108,7 @@ int ecp_node_set_addr(ECPNode *node, void *addr) {
int rv;
rv = ecp_tr_addr_set(&node->addr, addr);
- if (rv) return ECP_ERR_ADDR;
-
- return ECP_OK;
+ return rv;
}
static int conn_table_create(ECPConnTable *conn_table) {
@@ -2702,8 +2697,6 @@ ssize_t ecp_pkt_send(ECPSocket *sock, ECPBuffer *packet, size_t pkt_size, unsign
}
rv = ecp_tr_send(sock, packet, pkt_size, addr, flags);
- if (rv < 0) return rv;
-
return rv;
}