From e02229250d4b366e30776e6c78952f2472fababb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 3 Oct 2020 07:21:40 -0700 Subject: [PATCH] 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; --- wiretap/nettrace_3gpp_32_423.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;