From 712fddacfb5c4a8a48d9c5debe1870bc051d836c Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Tue, 6 Nov 2012 02:44:12 +0900 Subject: [PATCH] ping,ping6: Fix hang with -f option. Bug was introduced by commit 8feb586c4... (ping,ping6: Check return value of write(2) for stdout.). https://bugs.archlinux.org/task/32306 Patch-by: Jan Synacek Reported-by: Mohammad Alsaleh Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Peter Korsgaard --- ping_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ping_common.h b/ping_common.h index d2a2b5c..6726e1b 100644 --- a/ping_common.h +++ b/ping_common.h @@ -140,7 +140,7 @@ static inline void write_stdout(const char *str, size_t len) do { cc = write(STDOUT_FILENO, str + o, len - o); o += cc; - } while (len >= o || cc < 0); + } while (len > o || cc < 0); } /* -- 2.1.3