mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: Prefer assert_non_null() over assert_false()
This also replaces some occurrences of assert_true() with assert_null() Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
bdf968c178
commit
27caaa000b
@@ -128,7 +128,7 @@ static void torture_knownhosts_port(void **state) {
|
||||
file = fopen(known_hosts_file, "r");
|
||||
assert_non_null(file);
|
||||
p = fgets(buffer, sizeof(buffer), file);
|
||||
assert_false(p == NULL);
|
||||
assert_non_null(p);
|
||||
fclose(file);
|
||||
buffer[sizeof(buffer) - 1] = '\0';
|
||||
assert_non_null(strstr(buffer,"[127.0.0.10]:1234 "));
|
||||
|
||||
Reference in New Issue
Block a user