aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-09-04 13:27:45 -0700
committerGuy Harris <guy@alum.mit.edu>2019-09-04 20:46:38 +0000
commit05e39afb3fdbf76452a05c1c2a2c3164af9702ed (patch)
tree2e39e71b47559f8445e9f4a1b23afcf7cde091b3
parentd58f8f57c110254a72b3329c457e748830808667 (diff)
Put the year field of the timestamp out in little-endian byte order.
Change-Id: I9de300b05e8d66e71359241fddfe10d90f3f8d33 Reviewed-on: https://code.wireshark.org/review/34454 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--wiretap/commview.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/commview.c b/wiretap/commview.c
index 24a5e2fd63..ce5f68f42e 100644
--- a/wiretap/commview.c
+++ b/wiretap/commview.c
@@ -416,7 +416,7 @@ static gboolean commview_dump(wtap_dumper *wdh,
tm = localtime(&rec->ts.secs);
if (tm != NULL) {
- cv_hdr.year = tm->tm_year + 1900;
+ cv_hdr.year = GUINT16_TO_LE(tm->tm_year + 1900);
cv_hdr.month = tm->tm_mon + 1;
cv_hdr.day = tm->tm_mday;
cv_hdr.hours = tm->tm_hour;
@@ -427,7 +427,7 @@ static gboolean commview_dump(wtap_dumper *wdh,
/*
* Second before the Epoch.
*/
- cv_hdr.year = 1969;
+ cv_hdr.year = GUINT16_TO_LE(1969);
cv_hdr.month = 12;
cv_hdr.day = 31;
cv_hdr.hours = 23;