Skip to content

Commit

Permalink
style: fix redundant return (#5150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmayclin authored Mar 6, 2025
1 parent d3891a5 commit 9c85d3c
Show file tree
Hide file tree
Showing 54 changed files with 0 additions and 56 deletions.
2 changes: 0 additions & 2 deletions tests/unit/s2n_build_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ int main()

if (s2n_libcrypto == NULL || s2n_libcrypto[0] == '\0') {
END_TEST();
return 0;
}

if (strcmp(s2n_libcrypto, "default") == 0) {
Expand Down Expand Up @@ -178,5 +177,4 @@ int main()
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_cert_chain_and_key_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,4 @@ int main(int argc, char **argv)
free(alligator_cert);
free(alligator_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_cert_status_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,5 +393,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_cert_status_response_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_change_cipher_spec_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_choose_supported_group_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,4 @@ int main()
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_alpn_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_cert_status_request_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_extensions_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,5 +1485,4 @@ int main(int argc, char **argv)
free(cert_chain);
free(private_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_hello_recv_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,5 +555,4 @@ int main(int argc, char **argv)
free(tls13_cert_chain);
free(tls13_private_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_hello_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1956,5 +1956,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_cert_chain_and_key_free(chain_and_key));
EXPECT_SUCCESS(s2n_cert_chain_and_key_free(ecdsa_chain_and_key));
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_key_share_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,6 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}

static int s2n_test_rewrite_length(struct s2n_stuffer *stuffer)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/s2n_client_max_frag_len_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_record_version_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,4 @@ int main(int argc, char **argv)
free(cert_chain);
free(private_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_secure_renegotiation_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,4 @@ int main(int argc, char **argv)
free(cert_chain);
free(private_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_server_name_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_session_ticket_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_config_free(config));

END_TEST();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_cert_chain_and_key_free(chain_and_key));

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_supported_groups_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,5 +544,4 @@ int main()
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_client_supported_versions_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,5 +485,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_config_free(config));

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_connection_blinding_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_connection_serialize_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,5 +949,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_connection_size_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ int main(int argc, char **argv)
*/
if (is_32_bit_platform()) {
END_TEST();
return 0;
}

/* Carefully consider any increases to this number. */
Expand Down
1 change: 0 additions & 1 deletion tests/unit/s2n_ecc_point_format_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_config_free(config));

END_TEST();
return 0;
}
2 changes: 0 additions & 2 deletions tests/unit/s2n_extensions_server_key_share_select_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ int main()
EXPECT_OK(s2n_kem_preferences_groups_available(&kem_preferences_all, &available_groups));
if (available_groups < 2) {
END_TEST();
return 0;
}

EXPECT_SUCCESS(s2n_enable_tls13_in_test());
Expand Down Expand Up @@ -432,5 +431,4 @@ int main()
};
};
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_handshake_invariant_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ int main(int argc, char **argv)

s2n_connection_free(conn);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_handshake_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_mutual_auth_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,5 +390,4 @@ int main(int argc, char **argv)
free(private_key_pem);
free(dhparams_pem);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_optional_client_auth_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,4 @@ int main(int argc, char **argv)
free(private_key_pem);
free(dhparams_pem);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_protocol_preferences_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_safety_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_self_talk_broken_pipe_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_self_talk_nonblocking_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,5 +388,4 @@ int main(int argc, char **argv)
}
}
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_self_talk_session_id_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,5 +667,4 @@ int main(int argc, char **argv)
free(private_key_pem);

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_self_talk_tls12_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_self_talk_tls13_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,4 @@ int main(int argc, char **argv)
s2n_disable_tls13_in_test();

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_alpn_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_early_data_indication_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,5 +303,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_extensions_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,5 +678,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_cert_chain_and_key_free(chain_and_key));

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_key_share_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,6 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}

static int s2n_read_server_key_share_hybrid_test_vectors(const struct s2n_kem_group *kem_group, struct s2n_blob *pq_private_key,
Expand Down
1 change: 0 additions & 1 deletion tests/unit/s2n_server_max_frag_len_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_renegotiation_info_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,4 @@ int main(int argc, char **argv)
}

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_sct_list_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_server_name_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_session_ticket_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_server_supported_versions_extension_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,4 @@ int main(int argc, char **argv)
EXPECT_SUCCESS(s2n_config_free(config));

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_session_ticket_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,5 +1760,4 @@ int main(int argc, char **argv)
free(cert_chain);
free(private_key);
END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_stuffer_text_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls12_handshake_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,5 +521,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls13_client_finished_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls13_handshake_state_machine_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,5 +1004,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls13_handshake_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls13_server_finished_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}
1 change: 0 additions & 1 deletion tests/unit/s2n_tls13_support_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,4 @@ int main(int argc, char **argv)
};

END_TEST();
return 0;
}

0 comments on commit 9c85d3c

Please sign in to comment.