logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0003-Don-t-return-expression-in-function-returning-void.patch (1487B)


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