cmdline: remove unnecessary #ifdef
Checks
Commit Message
The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/cmdline.c | 2 --
app/test/test_cmdline_ipaddr.c | 2 --
lib/librte_cmdline/cmdline_parse_ipaddr.c | 2 --
3 files changed, 6 deletions(-)
Comments
On Fri, Nov 08, 2019 at 10:00:35AM -0800, Stephen Hemminger wrote:
> The #ifdef to conditionally include <sys/socket.h> on BSD
> is unnecessary. It is harmless to include the header on other
> OS's. An extra include is better than an #ifdef.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> app/test-pmd/cmdline.c | 2 --
> app/test/test_cmdline_ipaddr.c | 2 --
> lib/librte_cmdline/cmdline_parse_ipaddr.c | 2 --
> 3 files changed, 6 deletions(-)
>
Seems reasonable
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On Fri, Nov 08, 2019 at 10:00:35AM -0800, Stephen Hemminger wrote:
> The #ifdef to conditionally include <sys/socket.h> on BSD
> is unnecessary. It is harmless to include the header on other
> OS's. An extra include is better than an #ifdef.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Thanks
On Tue, Nov 12, 2019 at 9:11 AM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> On Fri, Nov 08, 2019 at 10:00:35AM -0800, Stephen Hemminger wrote:
> > The #ifdef to conditionally include <sys/socket.h> on BSD
> > is unnecessary. It is harmless to include the header on other
> > OS's. An extra include is better than an #ifdef.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Applied, thanks.
--
David Marchand
@@ -11,9 +11,7 @@
#include <termios.h>
#include <unistd.h>
#include <inttypes.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
-#endif
#include <netinet/in.h>
#include <sys/queue.h>
@@ -6,9 +6,7 @@
#include <string.h>
#include <inttypes.h>
#include <netinet/in.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
-#endif
#include <rte_string_fns.h>
@@ -13,9 +13,7 @@
#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
-#endif
#include <rte_string_fns.h>