Skip to content

Commit 095af98

Browse files
Björn Töpelborkmann
authored andcommitted
selftests/bpf: Avoid useless void *-casts
There is no need to cast to void * when the argument is void *. Avoid cluttering of code. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210122154725.22140-13-bjorn.topel@gmail.com
1 parent d08a17d commit 095af98

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/testing/selftests/bpf/xdpxceiver.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int validate_interfaces(void)
416416
exit_with_error(errno);
417417

418418
targs->idx = i;
419-
if (pthread_create(&ns_thread, NULL, nsswitchthread, (void *)targs))
419+
if (pthread_create(&ns_thread, NULL, nsswitchthread, targs))
420420
exit_with_error(errno);
421421

422422
pthread_join(ns_thread, NULL);
@@ -923,12 +923,12 @@ static void testapp_validate(void)
923923

924924
/*Spawn RX thread */
925925
if (!opt_bidi || (opt_bidi && !bidi_pass)) {
926-
if (pthread_create(&t0, &attr, worker_testapp_validate, (void *)ifdict[1]))
926+
if (pthread_create(&t0, &attr, worker_testapp_validate, ifdict[1]))
927927
exit_with_error(errno);
928928
} else if (opt_bidi && bidi_pass) {
929929
/*switch Tx/Rx vectors */
930930
ifdict[0]->fv.vector = rx;
931-
if (pthread_create(&t0, &attr, worker_testapp_validate, (void *)ifdict[0]))
931+
if (pthread_create(&t0, &attr, worker_testapp_validate, ifdict[0]))
932932
exit_with_error(errno);
933933
}
934934

@@ -943,12 +943,12 @@ static void testapp_validate(void)
943943

944944
/*Spawn TX thread */
945945
if (!opt_bidi || (opt_bidi && !bidi_pass)) {
946-
if (pthread_create(&t1, &attr, worker_testapp_validate, (void *)ifdict[0]))
946+
if (pthread_create(&t1, &attr, worker_testapp_validate, ifdict[0]))
947947
exit_with_error(errno);
948948
} else if (opt_bidi && bidi_pass) {
949949
/*switch Tx/Rx vectors */
950950
ifdict[1]->fv.vector = tx;
951-
if (pthread_create(&t1, &attr, worker_testapp_validate, (void *)ifdict[1]))
951+
if (pthread_create(&t1, &attr, worker_testapp_validate, ifdict[1]))
952952
exit_with_error(errno);
953953
}
954954

0 commit comments

Comments
 (0)