Skip to content

Commit

Permalink
selftests: net: remove unused variables
Browse files Browse the repository at this point in the history
These variables are never referenced in the code, just remove them

Signed-off-by: zhujun2 <zhujun2@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
zhujun2 authored and David S. Miller committed Oct 16, 2023
1 parent 101c603 commit 3c4fe89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion tools/testing/selftests/net/af_unix/scm_pidfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ static void fill_sockaddr(struct sock_addr *addr, bool abstract)
static void client(FIXTURE_DATA(scm_pidfd) *self,
const FIXTURE_VARIANT(scm_pidfd) *variant)
{
int err;
int cfd;
socklen_t len;
struct ucred peer_cred;
Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/net/af_unix/test_unix_oob.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ main(int argc, char **argv)
char buf[1024];
int on = 0;
char oob;
int flags;
int atmark;
char *tmp_file;

lfd = socket(AF_UNIX, SOCK_STREAM, 0);
memset(&consumer_addr, 0, sizeof(consumer_addr));
Expand Down
5 changes: 3 additions & 2 deletions tools/testing/selftests/net/nettest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1864,8 +1864,9 @@ static char *random_msg(int len)
n += i;
len -= i;
}
i = snprintf(m + n, olen - n, "%.*s", len,
"abcdefghijklmnopqrstuvwxyz");

snprintf(m + n, olen - n, "%.*s", len,
"abcdefghijklmnopqrstuvwxyz");
return m;
}

Expand Down

0 comments on commit 3c4fe89

Please sign in to comment.