aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.h
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2019-12-13 13:13:32 +0100
committerGerald Combs <gerald@wireshark.org>2019-12-13 22:29:01 +0000
commitabd83d9961d7c90896d5f941ecd97850306e3b1f (patch)
treec1cd7bd4f8464f0ec060706a348654ad31da1c50 /capture_opts.h
parent8b8bf626000291c0187715196ee907c1b5265a99 (diff)
cmdline: cleanup option string definitions
Option string composition has grown organically over time and is depending on compilation options also. This results in somewhat complex macro definitions and the use of the string concatenation feature of the C compiler. This change tries to clean up some of this magic by removing definitions of empty strings and merging of adjacent strings. Change-Id: I968449ea9b564915bee468a0cac0e114983ceebe Reviewed-on: https://code.wireshark.org/review/35429 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'capture_opts.h')
-rw-r--r--capture_opts.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/capture_opts.h b/capture_opts.h
index 0a35b01341..7ad9df6ea8 100644
--- a/capture_opts.h
+++ b/capture_opts.h
@@ -60,7 +60,7 @@ extern "C" {
#ifdef HAVE_PCAP_REMOTE
#define OPTSTRING_A "A:"
#else
-#define OPTSTRING_A ""
+#define OPTSTRING_A
#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
@@ -69,7 +69,7 @@ extern "C" {
#define OPTSTRING_B "B:"
#else
#define LONGOPT_BUFFER_SIZE
-#define OPTSTRING_B ""
+#define OPTSTRING_B
#endif
#ifdef HAVE_PCAP_CREATE
@@ -77,7 +77,7 @@ extern "C" {
#define OPTSTRING_I "I"
#else
#define LONGOPT_MONITOR_MODE
-#define OPTSTRING_I ""
+#define OPTSTRING_I
#endif
#define LONGOPT_CAPTURE_COMMON \
@@ -381,7 +381,7 @@ capture_opts_free_interface_t(interface_t *device);
}
#endif /* __cplusplus */
-#endif /* capture_opts.h */
+#endif /* __CAPTURE_OPTS_H__ */
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html