Remove unused snprintf count parameter
Some checks failed
libakstdlib CI Build / cmake_build (push) Successful in 2m55s
libakstdlib CI Build / sanitizers (push) Successful in 2m56s
libakstdlib CI Build / mutation_test (push) Failing after 1s
libakstdlib CI Build / coverage (push) Successful in 2m50s

This commit is contained in:
2026-08-03 16:33:09 -04:00
parent 83ff77608f
commit 0620370dd9
6 changed files with 38 additions and 71 deletions

View File

@@ -83,11 +83,10 @@ having visited nothing.
/* before */
aksl_sprintf(&count, buf, "%s=%d", key, value);
/* after */
aksl_snprintf(&count, buf, sizeof(buf), "%s=%d", key, value);
aksl_snprintf(buf, sizeof(buf), "%s=%d", key, value);
```
Truncation is `AKERR_OUTOFBOUNDS` rather than a short success, and `*count` is
`0` on any failure rather than `vsprintf`'s `-1`.
Truncation is `AKERR_OUTOFBOUNDS` rather than a short success.
**`aksl_realpath` takes the destination's length.**