summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2019-06-16 13:15:01 -0400
committerDavid S. Miller <davem@davemloft.net>2019-06-16 14:27:14 -0700
commitf464100f576610aa4702dd9e168c80d6c661958a (patch)
treec700be2eb821339cf2fe456566310cfb8e7a8221
parent8e6a481739a840237ffda9bdc5d4a7ae722745d0 (diff)
downloadlinux-f464100f576610aa4702dd9e168c80d6c661958a.tar.bz2
selftests/net: fix warnings in TFO key rotation selftest
One warning each on signedness, unused variable and return type. Fixes: 10fbcdd12aa2 ("selftests/net: add TFO key rotation selftest") Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--tools/testing/selftests/net/tcp_fastopen_backup_key.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/tcp_fastopen_backup_key.c b/tools/testing/selftests/net/tcp_fastopen_backup_key.c
index 58bb77d9e7e1..9c55ec44fc43 100644
--- a/tools/testing/selftests/net/tcp_fastopen_backup_key.c
+++ b/tools/testing/selftests/net/tcp_fastopen_backup_key.c
@@ -51,7 +51,7 @@ static const int PORT = 8891;
static void get_keys(int fd, uint32_t *keys)
{
char buf[128];
- int len = KEY_LENGTH * 2;
+ socklen_t len = KEY_LENGTH * 2;
if (do_sockopt) {
if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len))
@@ -210,14 +210,13 @@ static bool is_listen_fd(int fd)
return false;
}
-static int rotate_key(int fd)
+static void rotate_key(int fd)
{
static int iter;
static uint32_t new_key[4];
uint32_t keys[8];
uint32_t tmp_key[4];
int i;
- int len = KEY_LENGTH * 2;
if (iter < N_LISTEN) {
/* first set new key as backups */