]> www.infradead.org Git - users/willy/xarray.git/commitdiff
selftests: net: remove unused variables
authorzhujun2 <zhujun2@cmss.chinamobile.com>
Mon, 16 Oct 2023 06:30:39 +0000 (23:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2023 08:20:08 +0000 (09:20 +0100)
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>
tools/testing/selftests/net/af_unix/scm_pidfd.c
tools/testing/selftests/net/af_unix/test_unix_oob.c
tools/testing/selftests/net/nettest.c

index a86222143d7929592b68ab30df0b414da066ff39..7e534594167efdaf8ff338731a4b0e3688b63c30 100644 (file)
@@ -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;
index 532459a15067cc5933caa8d7bd31a3c0bef406b4..a7c51889acd5a24944e9889fcebffd18ed8ae6f1 100644 (file)
@@ -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));
index 39a0e01f85547c57dc955e2e98f418b2971eeb05..cd8a580974480212b45d86f35293b77f3d033473 100644 (file)
@@ -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;
 }