build: Fix a -fanalyze issue in the tests.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m32s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m32s
This commit is contained in:
parent
0dc148bfea
commit
58c3e6c2ab
@ -1582,7 +1582,7 @@ void tf_ssb_test_cli(const tf_test_options_t* options)
|
||||
|
||||
snprintf(command, sizeof(command), "%s get_sequence -i %s -d out/test_db0.sqlite", options->exe_path, id);
|
||||
char* sequence = _trim(_subprocess_check_output(command));
|
||||
if (strcmp(sequence, "2") != 0)
|
||||
if (!sequence || strcmp(sequence, "2") != 0)
|
||||
{
|
||||
tf_printf("sequence = %s (expected 1)\n", sequence);
|
||||
abort();
|
||||
@ -1592,7 +1592,7 @@ void tf_ssb_test_cli(const tf_test_options_t* options)
|
||||
snprintf(command, sizeof(command), "%s get_profile -i %s -d out/test_db0.sqlite", options->exe_path, id);
|
||||
char* profile = _trim(_subprocess_check_output(command));
|
||||
const char* k_expected_profile = "{\"name\":\"test_user\"}";
|
||||
if (strcmp(profile, k_expected_profile) != 0)
|
||||
if (!profile || strcmp(profile, k_expected_profile) != 0)
|
||||
{
|
||||
tf_printf("profile = %s (expected \"%s\")\n", profile, k_expected_profile);
|
||||
abort();
|
||||
|
Loading…
x
Reference in New Issue
Block a user