xfrm_xfrma_print() takes a bool parameter named "dir" that selects whether the direction is printed. The XFRMA_SA_DIR block declares a __u8 local of the same name holding the attribute value, so the two distinct meanings share one identifier and the local hides the parameter for the rest of the block. Rename the local to sa_dir. No change in output; the fallback that prints an unrecognized direction keeps reporting the attribute value rather than the print flag. Signed-off-by: Stephen Hemminger <step…@networkplumber.org> --- ip/ipxfrm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c index 78d9e192..4a63dc16 100644 --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c @@ -908,15 +908,15 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family, FILE *fp, fprintf(fp, "%s", _SL_); } if (tb[XFRMA_SA_DIR]) { - __u8 dir = rta_getattr_u8(tb[XFRMA_SA_DIR]); + __u8 sa_dir = rta_getattr_u8(tb[XFRMA_SA_DIR]); fprintf(fp, "\tdir "); - if (dir == XFRM_SA_DIR_IN) + if (sa_dir == XFRM_SA_DIR_IN) fprintf(fp, "in"); - else if (dir == XFRM_SA_DIR_OUT) + else if (sa_dir == XFRM_SA_DIR_OUT) fprintf(fp, "out"); else - fprintf(fp, "other (%d)", dir); + fprintf(fp, "other (%d)", sa_dir); fprintf(fp, "%s", _SL_); } if (tb[XFRMA_SA_PCPU]) {
-- 2.53.0