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:
Anderson Toshiyuki Sasaki
2019-01-15 13:45:10 +01:00
committed by Andreas Schneider
parent bdf968c178
commit 27caaa000b
5 changed files with 8 additions and 8 deletions

View File

@@ -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 "));