Acked-by: Darrell Ball <[email protected]>
Tested-by: Darrell Ball <[email protected]>

Thanks for the pointer



On Mon, Jul 9, 2018 at 4:48 PM, Ben Pfaff <[email protected]> wrote:

> Found with:
>     git ls-files | xargs pcregrep -n -M 'return;\n*}'
>
> Signed-off-by: Ben Pfaff <[email protected]>
> ---
>  datapath-windows/ovsext/Driver.c          | 1 -
>  datapath-windows/ovsext/IpHelper.c        | 6 ------
>  datapath-windows/ovsext/Netlink/Netlink.c | 1 -
>  datapath-windows/ovsext/Vport.c           | 1 -
>  lib/conntrack.c                           | 4 ----
>  lib/lldp/lldpd.c                          | 2 --
>  lib/netdev-native-tnl.c                   | 1 -
>  tests/test-aa.c                           | 6 ------
>  tests/test-ovsdb.c                        | 3 ---
>  9 files changed, 25 deletions(-)
>
> diff --git a/datapath-windows/ovsext/Driver.c b/datapath-windows/ovsext/
> Driver.c
> index 50c9614e42ef..0d23adaf7296 100644
> --- a/datapath-windows/ovsext/Driver.c
> +++ b/datapath-windows/ovsext/Driver.c
> @@ -201,5 +201,4 @@ OvsExtStatus(NDIS_HANDLE filterModuleContext,
>      POVS_SWITCH_CONTEXT switchObject = (POVS_SWITCH_CONTEXT)
> filterModuleContext;
>
>      NdisFIndicateStatus(switchObject->NdisFilterHandle,
> statusIndication);
> -    return;
>  }
> diff --git a/datapath-windows/ovsext/IpHelper.c b/datapath-windows/ovsext/
> IpHelper.c
> index 6bbd096c53b0..c734b0ecc2e2 100644
> --- a/datapath-windows/ovsext/IpHelper.c
> +++ b/datapath-windows/ovsext/IpHelper.c
> @@ -565,8 +565,6 @@ OvsUpdateIpInterfaceNotification(PMIB_IPINTERFACE_ROW
> ipRow)
>          ExReleaseResourceLite(&instance->lock);
>      }
>      ExReleaseResourceLite(&ovsInstanceListLock);
> -
> -    return;
>  }
>
>  static VOID
> @@ -672,8 +670,6 @@ error:
>              OvsIpHelperDeleteInstance(instance);
>          }
>      }
> -
> -    return;
>  }
>
>  static VOID
> @@ -713,8 +709,6 @@ OvsRemoveIpInterfaceNotification(PMIB_IPINTERFACE_ROW
> ipRow)
>          OvsCleanupIpHelperRequestList();
>          OvsCleanupFwdTable();
>      }
> -
> -    return;
>  }
>
>  static VOID
> diff --git a/datapath-windows/ovsext/Netlink/Netlink.c
> b/datapath-windows/ovsext/Netlink/Netlink.c
> index 156732cdb3af..f4a0050480c2 100644
> --- a/datapath-windows/ovsext/Netlink/Netlink.c
> +++ b/datapath-windows/ovsext/Netlink/Netlink.c
> @@ -653,7 +653,6 @@ VOID
>  NlMsgAlignSize(const PNL_MSG_HDR nlh)
>  {
>      nlh->nlmsgLen = NLMSG_ALIGN(nlh->nlmsgLen);
> -    return;
>  }
>
>  /*
> diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/
> Vport.c
> index 7cf2497e3988..380870a111d8 100644
> --- a/datapath-windows/ovsext/Vport.c
> +++ b/datapath-windows/ovsext/Vport.c
> @@ -1219,7 +1219,6 @@ UpdateSwitchCtxWithVport(POVS_SWITCH_CONTEXT
> switchContext,
>      if (newPort) {
>          switchContext->numHvVports++;
>      }
> -    return;
>  }
>
>  /*
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index 97fd46a5e167..333f5d41aa1e 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -2085,8 +2085,6 @@ nat_ipv6_addr_increment(struct in6_addr
> *ipv6_aligned, uint32_t increment)
>
>      memcpy(ipv6_hi, &addr6_64_hi, sizeof addr6_64_hi);
>      memcpy(ipv6_lo, &addr6_64_lo, sizeof addr6_64_lo);
> -
> -    return;
>  }
>
>  static uint32_t
> @@ -3282,7 +3280,6 @@ handle_ftp_ctl(struct conntrack *ct, const struct
> conn_lookup_ctx *ctx,
>      uint8_t pad = dp_packet_l2_pad_size(pkt);
>      th->tcp_csum = csum_finish(
>          csum_continue(tcp_csum, th, tail - (char *) th - pad));
> -    return;
>  }
>
>  static void
> @@ -3296,5 +3293,4 @@ handle_tftp_ctl(struct conntrack *ct,
>      expectation_create(ct, conn_for_expectation->key.src.port,
>                         conn_for_expectation,
>                         !!(pkt->md.ct_state & CS_REPLY_DIR), false, false);
> -    return;
>  }
> diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c
> index 036ff4f4ccdc..19e930526695 100644
> --- a/lib/lldp/lldpd.c
> +++ b/lib/lldp/lldpd.c
> @@ -408,8 +408,6 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,
>      if (!oport)  {
>          hw->h_insert_cnt++;
>      }
> -
> -    return;
>  }
>
>  static void
> diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c
> index a63fe24196d9..56baaa217a5d 100644
> --- a/lib/netdev-native-tnl.c
> +++ b/lib/netdev-native-tnl.c
> @@ -614,7 +614,6 @@ netdev_erspan_push_header(const struct netdev *netdev,
>          md2 = ALIGNED_CAST(struct erspan_md2 *, ersh + 1);
>          put_16aligned_be32(&md2->timestamp, get_erspan_ts(ERSPAN_100US));
>      }
> -    return;
>  }
>
>  int
> diff --git a/tests/test-aa.c b/tests/test-aa.c
> index 1290ca8c9a7c..0107d2263bc8 100644
> --- a/tests/test-aa.c
> +++ b/tests/test-aa.c
> @@ -47,8 +47,6 @@ check_received_port(struct lldpd_port *sport,
>      assert(rport->p_id_len == sport->p_id_len);
>      assert(strncmp(rport->p_id, sport->p_id, sport->p_id_len) == 0);
>      assert(strcmp(rport->p_descr, sport->p_descr) == 0);
> -
> -    return;
>  }
>
>
> @@ -66,8 +64,6 @@ check_received_chassis(struct lldpd_chassis *schassis,
>      assert(strcmp(rchassis->c_descr, schassis->c_descr) == 0);
>      assert(rchassis->c_cap_available == schassis->c_cap_available);
>      assert(rchassis->c_cap_enabled == schassis->c_cap_enabled);
> -
> -    return;
>  }
>
>
> @@ -113,8 +109,6 @@ check_received_aa(struct lldpd_port *sport,
>          i++;
>      }
>      assert(i == 2);
> -
> -    return;
>  }
>
>
> diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
> index 48706b71c719..de94fd0cd51d 100644
> --- a/tests/test-ovsdb.c
> +++ b/tests/test-ovsdb.c
> @@ -2624,7 +2624,6 @@ do_idl_partial_update_map_column(struct
> ovs_cmdl_context *ctx)
>
>      ovsdb_idl_destroy(idl);
>      printf("%03d: End test\n", step);
> -    return;
>  }
>
>  static void
> @@ -2744,7 +2743,6 @@ do_idl_partial_update_set_column(struct
> ovs_cmdl_context *ctx)
>      dump_simple3(idl, myRow, step++);
>      ovsdb_idl_destroy(idl);
>      printf("%03d: End test\n", step);
> -    return;
>  }
>
>  static void
> @@ -2817,7 +2815,6 @@ do_idl_compound_index_with_ref(struct
> ovs_cmdl_context *ctx)
>
>      ovsdb_idl_destroy(idl);
>      printf("%03d: End test\n", step);
> -    return;
>  }
>
>
> --
> 2.16.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to