aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-06-27 20:39:15 -0700
committerGuy Harris <guy@alum.mit.edu>2018-06-28 03:39:54 +0000
commit8304f69fd7f02cb5fe79010170c7550d441ad6e7 (patch)
tree5b95441afcd9ff732999054dffb13939e03cdce9 /editcap.c
parentc8518753c8d3f7bb809d2615adc9f6f2e5e89530 (diff)
Add macros to initialize nstime_t values and use them.
This allows code to initialize them without having to know the details of the structure; the initializes should, and will, be changed if the members of the structure are changed. Change-Id: I93e6ebfcde9ceca17df696fcba4e8410c5afb175 Reviewed-on: https://code.wireshark.org/review/28501 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/editcap.c b/editcap.c
index 69cd055c98..2ca3ce5d61 100644
--- a/editcap.c
+++ b/editcap.c
@@ -159,8 +159,8 @@ static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE
#endif
static int out_frame_type = -2; /* Leave frame type alone */
static int verbose = 0; /* Not so verbose */
-static struct time_adjustment time_adj = {{0, 0}, 0}; /* no adjustment */
-static nstime_t relative_time_window = {0, 0}; /* de-dup time window */
+static struct time_adjustment time_adj = {NSTIME_INIT_ZERO, 0}; /* no adjustment */
+static nstime_t relative_time_window = NSTIME_INIT_ZERO; /* de-dup time window */
static double err_prob = 0.0;
static time_t starttime = 0;
static time_t stoptime = 0;
@@ -170,8 +170,8 @@ static gboolean dup_detect = FALSE;
static gboolean dup_detect_by_time = FALSE;
static int do_strict_time_adjustment = FALSE;
-static struct time_adjustment strict_time_adj = {{0, 0}, 0}; /* strict time adjustment */
-static nstime_t previous_time = {0, 0}; /* previous time */
+static struct time_adjustment strict_time_adj = {NSTIME_INIT_ZERO, 0}; /* strict time adjustment */
+static nstime_t previous_time = NSTIME_INIT_ZERO; /* previous time */
static int find_dct2000_real_data(guint8 *buf);
static void handle_chopping(chop_t chop, wtap_packet_header *out_phdr,