[LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c
Petr Vorel
pvorel@suse.cz
Thu Apr 4 15:53:23 CEST 2024
Hi,
> event not initialized to 0 causes "Got a notification,
> expecting a datamsg" issues
Out of curiosity which architecture, kernel version, toolchain version and
distro do you see the issue? I cannot reproduce it on any of systems we test.
...
> +++ b/utils/sctp/func_tests/test_1_to_1_events.c
> @@ -96,6 +96,7 @@ main(void)
> /* Create the client socket. */
> clt_sk = test_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
> + memset(&event, 0, sizeof(struct sctp_event_subscribe));
Obviously correct.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Note, nowadays it'd be enough to initialize as:
struct sctp_event_subscribe event = {0};
But because we use the old style with the rest of the functions, memset() is OK.
Kind regards,
Petr
More information about the ltp
mailing list