Invert boolean logic for readability for s2n_kex_supported and s2n_configure_kex
@@ -1039,9 +1039,9 @@ static int s2n_set_cipher_and_cert_as_server(struct s2n_connection *conn, uint8_
continue;
}
- /* Short circuit logic to ensure the kex is supported (returns non zero value) and that the kex is
+ /* Short circuit logic to ensure the kex is supported (returns true, non zero value) and that the kex is
* configured correctly (returns 0) else continue to to the next matching cipher_suite */
- if (!(s2n_kex_supported(match, conn) != 0 && s2n_configure_kex(match, conn) == 0)){
+ if (!s2n_kex_supported(match, conn) || s2n_configure_kex(match, conn)) {
continue;
}
