Commit Graph

13 Commits

Author SHA1 Message Date
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Michael Mann 3d673da88c Convert to using use SPDX identifier on wsutil directory
Change-Id: Id73e641499e75bc1afc1dea29682418156f461fe
Reviewed-on: https://code.wireshark.org/review/24751
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-10 04:36:29 +00:00
Guy Harris ea1ba62aec Fix up the compare chain in nstime_delta().
The first case handles the two time stamps having the same seconds
value, so, in the subsequent cases, they're guaranteed not to have the
same seconds value; check for b->secs < a->secs, not for b->secs <= a->secs
(the two tests will always get the same value, as b->secs != a->secs),
to make it clearer what's being done.

Change-Id: I6d3806237dae0ea12af92ea0344a31a2c5322b12
Reviewed-on: https://code.wireshark.org/review/15325
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-09 23:52:33 +00:00
Peter Wu b07226775e nstime: fix -Wshift-negative-value
Even if the result of the negative shift (in TIME_T_MIN) is not used
because the signedness check happens before, it still causes a
compile-time warning. Fix this by shifting on an unsigned value, then
truncate by casting it.

While at it, remove a "fix for broken SCO compiler", it might not apply
to us (fingers crossed).

Change-Id: Id9603149d8063e9eaaa65cf028323f10e60a6c42
Reviewed-on: https://code.wireshark.org/review/10862
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-09 22:59:26 +00:00
Bill Meier 4c3677ef3b Replace tabs in files with editor modeline "expandtab"
Change-Id: I4667fd4091c510a4c798f79dae333a07dc42dad6
Reviewed-on: https://code.wireshark.org/review/8880
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-11 02:15:35 +00:00
Guy Harris 8b720910d2 Calculate *Peek tagged timestamps in fixed-point.
Add a variant of filetime_to_nstime() that takes a value that's like a
FILETIME but in units of nanoseconds rather than tenths of a
microsecond, and use that.  (It looks as if they might just get FILETIME
values from the OS and multiply them by 100, as the nanosecond-FILETIME
values appear to be multiples of 100 in the captures I've seen, but they
might have chosen nanosecond resolution in case they need to support a
higher-resolution time stamp source, so we don't assume that the values
will always be a multiple of 100.)

Change-Id: If6a1cb2cb673688b042eb113b79cfd267f5454a5
Reviewed-on: https://code.wireshark.org/review/8150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-21 01:28:15 +00:00
Guy Harris 57d332dc0a Get rid of trailing white space.
Change-Id: I83ba78a9f153f4a193550c5069182b9203b28edb
Reviewed-on: https://code.wireshark.org/review/8144
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 20:53:45 +00:00
Guy Harris 94dc9cd113 Have a common routine to convert FILETIME to nstime_t.
We had several copies of that code; put it into a filetime_to_nstime()
routine in wsutil, and call that common routine instead.

Change-Id: I1eb5579c36c129ff8d23f9212285ab3f63be0f43
Reviewed-on: https://code.wireshark.org/review/8142
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20 20:41:38 +00:00
Guy Harris f67fc8a4d2 Fix some whitespace issues.
Change-Id: I363361e898c4b37fcde29847a1473530e5052733
Reviewed-on: https://code.wireshark.org/review/1771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 23:44:57 +00:00
Guy Harris d470a468a6 More handling of missing time stamps.
Make nstime_cmp() handle "unset" time stamps (they're equal to other
"unset" time stamps, and less than all other time stamps), use it in
reordercap, and "unset" the time stamp if it's absent.

Also, nstime_cmp() does not modify its argument, so make it const.

Change-Id: I016dab5fefaf4696e78cbd8c6dd3395808e54369
Reviewed-on: https://code.wireshark.org/review/1769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23 23:41:21 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 38edae1c71 Replace wtap_nstime with nstime_t, remove wtap_nstime_to_sec.
After r50154 nstime_t is inside wsutil/ so wiretap don't need it's own copy. 

svn path=/trunk/; revision=53184
2013-11-09 10:38:02 +00:00
Jeff Morriss a441793cba Move a couple of time-related modules into wsutil.
A bunch of files didn't really need to include these header files so remove
the include line rather than changing it.

svn path=/trunk/; revision=50154
2013-06-25 22:02:20 +00:00