Skip to content

Commit

Permalink
take care of compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbo committed Mar 6, 2016
1 parent 2f0e9ee commit 64ee0ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
18 changes: 0 additions & 18 deletions src/crypto_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@
#include "crypto.h"
#include "profile.h"

static struct crypt_pub *RSA_HKDF_new(void)
{
struct crypt_pub *cp = xmalloc(sizeof(*cp));

memset(cp, 0, sizeof(*cp));

cp->cp_hkdf = crypt_HKDF_SHA256_new();
cp->cp_pub = crypt_RSA_new();
cp->cp_n_c = 32;
cp->cp_n_s = 48;
cp->cp_k_len = 32;
cp->cp_min_key = (2048 / 8);
cp->cp_max_key = (4096 / 8);
cp->cp_cipher_len = (4096 / 8);

return cp;
}

static struct crypt_pub *ECDHE_HKDF_new(struct crypt*(*ctr)(void), int klen)
{
struct crypt_pub *cp = xmalloc(sizeof(*cp));
Expand Down
8 changes: 2 additions & 6 deletions src/tcpcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3145,7 +3145,6 @@ static void rdr_process_init(struct tc *tc)
int len;
struct ip *ip = (struct ip *) buf;
struct tcphdr *tcp = (struct tcphdr*) (ip + 1);
int rc;
struct fd *fd = tc->tc_rdr_fd;
struct tc_init1 *i1 = (struct tc_init1*) &buf[headroom];
int rem = sizeof(buf) - headroom;
Expand Down Expand Up @@ -3188,8 +3187,7 @@ static void rdr_process_init(struct tc *tc)
switch (tc->tc_state) {
/* outbound connections */
case STATE_INIT1_SENT:
rc = do_input_init1_sent(tc, ip, tcp);

do_input_init1_sent(tc, ip, tcp);
rdr_handshake_complete(tc);
break;

Expand Down Expand Up @@ -3484,11 +3482,9 @@ static int rdr_syn_ack(struct tc *tc, struct ip *ip, struct tcphdr *tcp)

static int rdr_ack(struct tc *tc, struct ip *ip, struct tcphdr *tcp)
{
int rc;

/* send init1 */
if (tc->tc_state == STATE_PKCONF_RCVD) {
rc = do_output_pkconf_rcvd(tc, ip, tcp, 0);
do_output_pkconf_rcvd(tc, ip, tcp, 0);

if (send(tc->tc_rdr_fd->fd_fd, tc->tc_rdr_buf, tc->tc_rdr_len,
0) != tc->tc_rdr_len) {
Expand Down

0 comments on commit 64ee0ad

Please sign in to comment.