git.samba.org
/
obnox
/
wireshark
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Revert part of r39883 to avoid dereferencing a NULL pointer. Thanks Clang.
[obnox/wireshark/wip.git]
/
wiretap
/
ngsniffer.c
diff --git
a/wiretap/ngsniffer.c
b/wiretap/ngsniffer.c
index 4dd24117728d79acf6a20f7bcec6f07a6c365b51..e515cffdecc698c42f7571b91b99f02347a5415a 100644
(file)
--- a/
wiretap/ngsniffer.c
+++ b/
wiretap/ngsniffer.c
@@
-2113,7
+2113,7
@@
ngsniffer_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
else
#endif
tm = localtime(&phdr->ts.secs);
- if (tm != NULL
|| tm->tm_year < 1980
) {
+ if (tm != NULL) {
start_date = (tm->tm_year - (1980 - 1900)) << 9;
start_date |= (tm->tm_mon + 1) << 5;
start_date |= tm->tm_mday;