diff options
author | Guy Harris <gharris@sonic.net> | 2020-10-03 07:21:40 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-10-03 07:21:40 -0700 |
commit | e02229250d4b366e30776e6c78952f2472fababb (patch) | |
tree | 9660f4a25914b74c989bf7bb3a64e1c12d2c727d /wiretap | |
parent | 79bf1f7d99fdfdd0a7c68999e4989c7757668c71 (diff) |
Nettrace: Fix fix to calculation of changetime
A long time ago, in a galaxy far far away, C had arithmetic/logical-
plus-assignment operators, so that
a = a {op} x;
could be written as
a ={op} x;
Unfortunately, if {op} is -, that meant that you could have, for
example:
a =- 17;
which could be interpreted as
a = -17;
so they changed the operators to be
a {op}= x;
I.e., if you want to subtract 1000 from a variable, do
elapsed_ms -= 1000;
not
elapsed_ms =- 1000;
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/nettrace_3gpp_32_423.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/nettrace_3gpp_32_423.c b/wiretap/nettrace_3gpp_32_423.c index 2099cc728c..16105f8415 100644 --- a/wiretap/nettrace_3gpp_32_423.c +++ b/wiretap/nettrace_3gpp_32_423.c @@ -1076,7 +1076,7 @@ create_temp_pcapng_file(wtap *wth, int *err, gchar **err_info, nettrace_3gpp_32_ guint start_ms = start_time.nsecs / 1000000; guint elapsed_ms = start_ms + ms; if (elapsed_ms > 1000) { - elapsed_ms =- 1000; + elapsed_ms -= 1000; second++; } packet_time.secs = start_time.secs + second; |