[git commit] zcip: do not query current time if we won't use the result

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 24 17:14:04 UTC 2015


commit: http://git.busybox.net/busybox/commit/?id=49d51598ac1db5e07a496a3014545f5daab8c501
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/zcip.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/networking/zcip.c b/networking/zcip.c
index d15c67d..f0e7342 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -361,8 +361,10 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
 			// make the kernel filter out all packets except
 			// ones we'd care about.
 		}
-		// Set deadline_us to the point in time when we timeout
-		deadline_us = MONOTONIC_US() + timeout_ms * 1000;
+		if (timeout_ms >= 0) {
+			// Set deadline_us to the point in time when we timeout
+			deadline_us = MONOTONIC_US() + timeout_ms * 1000;
+		}
 
 		VDBG("...wait %d %s nsent=%u\n",
 				timeout_ms, argv_intf, nsent);


More information about the busybox-cvs mailing list