diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-14 14:00:54 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-14 14:00:54 +0200 |
commit | dc75d3e305ba748dbb81a97cc4c88c68202e7fc5 (patch) | |
tree | d6076c0bb8e9c1060ab8d3d02596ee5ad264447b /lib/printf_test.c | |
parent | a9db956b61cb7f6ab4a27e9faff575ce6f601a04 (diff) | |
parent | 231c63851e3a56201dd02abfbf3fce47a80f8ae0 (diff) |
Merge commit '231c6385' into thread-next-iface
Diffstat (limited to 'lib/printf_test.c')
-rw-r--r-- | lib/printf_test.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/printf_test.c b/lib/printf_test.c index 47ea905d..88ecf05e 100644 --- a/lib/printf_test.c +++ b/lib/printf_test.c @@ -32,11 +32,14 @@ t_simple(void) BSPRINTF(1, "@", buf, "@", 64); BSPRINTF(1, "\xff", buf, "%c", 0xff); - errno = 5; - BSPRINTF(18, "Input/output error", buf, "%m"); + const char *io_error_str = lp_strdup(tmp_linpool, strerror(EIO)); + const int io_error_len = strlen(io_error_str); + + errno = EIO; + BSPRINTF(io_error_len, io_error_str, buf, "%m"); errno = 0; - BSPRINTF(18, "Input/output error", buf, "%M", 5); + BSPRINTF(io_error_len, io_error_str, buf, "%M", EIO); BSPRINTF(11, "TeSt%StRiNg", buf, "%s", "TeSt%StRiNg"); |