diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-05-03 23:55:50 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-07 08:06:30 +0200 |
| commit | 6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3 (patch) | |
| tree | 3c7a0a345eade16321c187242b055e341b3db91b | |
| parent | cbcd4284111f56a233b0c68fba403650c1fb0ccc (diff) | |
| download | passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar.gz passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar.bz2 passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar.lz passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar.xz passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.tar.zst passt-6cf93ed19d3e50094928b1a8eb2c9e5fed1df4a3.zip | |
fwd_rule: Fix some format specifiers
The new warnings in fwd_rule_add() have some not quite technically correct
format specifiers. For some weird reason these don't trip warnings on
passt itself, but do when we re-use this code in the upcoming configuration
client. Fix them.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
| -rw-r--r-- | fwd_rule.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -208,7 +208,7 @@ static int fwd_rule_add(struct fwd_table *fwd, const struct fwd_rule *new) return -EINVAL; } if (new->flags & ~allowed_flags) { - warn("Rule has invalid flags 0x%hhx", + warn("Rule has invalid flags 0x%x", new->flags & ~allowed_flags); return -EINVAL; } @@ -267,11 +267,11 @@ static int fwd_rule_add(struct fwd_table *fwd, const struct fwd_rule *new) } if (fwd->count >= ARRAY_SIZE(fwd->rules)) { - warn("Too many rules (maximum %u)", ARRAY_SIZE(fwd->rules)); + warn("Too many rules (maximum %d)", ARRAY_SIZE(fwd->rules)); return -ENOSPC; } if ((fwd->sock_count + num) > ARRAY_SIZE(fwd->socks)) { - warn("Rules require too many listening sockets (maximum %u)", + warn("Rules require too many listening sockets (maximum %d)", ARRAY_SIZE(fwd->socks)); return -ENOSPC; } |
