summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-10-01 16:15:00 +0200
committerThomas Haller <thaller@redhat.com>2014-10-01 16:29:21 +0200
commit1e4dd486984cb4fd2ddc81b39b57916c927a4899 (patch)
tree24302bc7499296bae93d6047e240d5e99fb37e86
parentaadae3256ecd13ed78ce99ab901f9d29084eecef (diff)
downloadNetworkManager-1e4dd486984cb4fd2ddc81b39b57916c927a4899.tar.gz
core: minor fix in nm_utils_kill_child_sync() having side-effects in MIN() macro
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/NetworkManagerUtils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
index 0096313a44..ed44839087 100644
--- a/src/NetworkManagerUtils.c
+++ b/src/NetworkManagerUtils.c
@@ -539,7 +539,8 @@ nm_utils_kill_child_sync (pid_t pid, int sig, guint64 log_domain, const char *lo
if (loop_count < 20) {
/* At the beginning we expect the process to die fast.
* Limit the sleep time, the limit doubles with every iteration. */
- sleep_time = MIN (sleep_time, (((guint64) 1) << loop_count++) * G_USEC_PER_SEC / 2000);
+ loop_count++;
+ sleep_time = MIN (sleep_time, (((guint64) 1) << loop_count) * G_USEC_PER_SEC / 2000);
}
g_usleep (sleep_time);
}