1From 1b0100dc4efba66f64b64ff86cb25c9312da2848 Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Sun, 16 Jun 2019 12:14:23 -0700
4Subject: [PATCH] Don't return expression in function returning void
5
6---
7 ip/iplink_xdp.c | 8 +++++---
8 ip/ipxfrm.c | 2 +-
9 2 files changed, 6 insertions(+), 4 deletions(-)
10
11diff --git a/ip/iplink_xdp.c b/ip/iplink_xdp.c
12index 5928dff7..8fe35def 100644
13--- a/ip/iplink_xdp.c
14+++ b/ip/iplink_xdp.c
15@@ -164,9 +164,11 @@ void xdp_dump(FILE *fp, struct rtattr *xdp, bool link, bool details)
16 mode = rta_getattr_u8(tb[IFLA_XDP_ATTACHED]);
17 if (mode == XDP_ATTACHED_NONE)
18 return;
19- else if (is_json_context())
20- return details ? (void)0 : xdp_dump_json(tb);
21- else if (details && link)
22+ else if (is_json_context()) {
23+ if (details)
24+ xdp_dump_json(tb);
25+ return;
26+ } else if (details && link)
27 /* don't print mode */;
28 else if (mode == XDP_ATTACHED_DRV)
29 fprintf(fp, "xdp");
30diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
31index b78c712d..c3a5986f 100644
32--- a/ip/ipxfrm.c
33+++ b/ip/ipxfrm.c
34@@ -526,7 +526,7 @@ static void __xfrm_algo_print(struct xfrm_algo *algo, int type, int len,
35 static inline void xfrm_algo_print(struct xfrm_algo *algo, int type, int len,
36 FILE *fp, const char *prefix, bool nokeys)
37 {
38- return __xfrm_algo_print(algo, type, len, fp, prefix, 1, nokeys);
39+ __xfrm_algo_print(algo, type, len, fp, prefix, 1, nokeys);
40 }
41
42 static void xfrm_aead_print(struct xfrm_algo_aead *algo, int len,
43--
442.44.0
45