mirror of
https://passt.top/passt
synced 2024-12-22 05:35:23 +00:00
conf: Fix clang-tidy warning about using an undefined enum value
In conf() we temporarily set the forwarding mode variables to 0 - an invalid value, so that we can check later if they've been set by the intervening logic. clang-tidy 18.1.1 in Fedora 40 now complains about this. Satisfy it by giving an name in the enum to the 0 value. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
26c71db332
commit
29bd08ff0f
4
conf.c
4
conf.c
@ -1203,8 +1203,8 @@ void conf(struct ctx *c, int argc, char **argv)
|
||||
optstring = "dqfel:hs:F:p:P:m:a:n:M:g:i:o:D:S:461t:u:";
|
||||
}
|
||||
|
||||
c->tcp.fwd_in.mode = c->tcp.fwd_out.mode = 0;
|
||||
c->udp.fwd_in.f.mode = c->udp.fwd_out.f.mode = 0;
|
||||
c->tcp.fwd_in.mode = c->tcp.fwd_out.mode = FWD_UNSET;
|
||||
c->udp.fwd_in.f.mode = c->udp.fwd_out.f.mode = FWD_UNSET;
|
||||
|
||||
do {
|
||||
name = getopt_long(argc, argv, optstring, options, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user