style(export): gchar*/g_free consistency + auto_char in read loop
All checks were successful
CI Code / Check spelling (pull_request) Successful in 2m12s
CI Code / Check coding style (pull_request) Successful in 2m23s
CI Code / Linux (arch) (pull_request) Successful in 5m35s
CI Code / Linux (debian) (pull_request) Successful in 6m59s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m41s
CI Code / Code Coverage (pull_request) Successful in 6m59s

This commit is contained in:
2026-05-02 12:32:51 +03:00
parent 555faaa232
commit 1fe3808b23
5 changed files with 68 additions and 57 deletions

View File

@@ -893,7 +893,7 @@ test_stress_mixed_types_and_encodings(void** state)
/* Parse and verify type/enc distribution */
fp = fopen(tmppath, "r");
assert_non_null(fp);
int counts[3] = { 0 }; /* chat, muc, mucpm */
int counts[3] = { 0 }; /* chat, muc, mucpm */
int enc_counts[5] = { 0 }; /* none, omemo, otr, pgp, ox */
int parsed = 0;
@@ -911,15 +911,23 @@ test_stress_mixed_types_and_encodings(void** state)
continue;
parsed++;
if (g_strcmp0(pl->type, "chat") == 0) counts[0]++;
else if (g_strcmp0(pl->type, "muc") == 0) counts[1]++;
else if (g_strcmp0(pl->type, "mucpm") == 0) counts[2]++;
if (g_strcmp0(pl->type, "chat") == 0)
counts[0]++;
else if (g_strcmp0(pl->type, "muc") == 0)
counts[1]++;
else if (g_strcmp0(pl->type, "mucpm") == 0)
counts[2]++;
if (g_strcmp0(pl->enc, "none") == 0) enc_counts[0]++;
else if (g_strcmp0(pl->enc, "omemo") == 0) enc_counts[1]++;
else if (g_strcmp0(pl->enc, "otr") == 0) enc_counts[2]++;
else if (g_strcmp0(pl->enc, "pgp") == 0) enc_counts[3]++;
else if (g_strcmp0(pl->enc, "ox") == 0) enc_counts[4]++;
if (g_strcmp0(pl->enc, "none") == 0)
enc_counts[0]++;
else if (g_strcmp0(pl->enc, "omemo") == 0)
enc_counts[1]++;
else if (g_strcmp0(pl->enc, "otr") == 0)
enc_counts[2]++;
else if (g_strcmp0(pl->enc, "pgp") == 0)
enc_counts[3]++;
else if (g_strcmp0(pl->enc, "ox") == 0)
enc_counts[4]++;
ff_parsed_line_free(pl);
}