Ticket #9953: 0001-Fix-to-std-dev-calculation-in-ping.patch

File 0001-Fix-to-std-dev-calculation-in-ping.patch, 675 bytes (added by Pete, 11 years ago)

patch to ping.c to fix qsqrt

  • src/bin/network/ping/ping.c

    From fbdaee6f753cf9ee779e60c008b1067133b02aba Mon Sep 17 00:00:00 2001
    From: Pete Goodeve <pete.goodeve@computer.org>
    Date: Mon, 9 Sep 2013 17:06:29 -0700
    Subject: [PATCH] Fix to std dev calculation in ping
    
    ---
     src/bin/network/ping/ping.c |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/bin/network/ping/ping.c b/src/bin/network/ping/ping.c
    index 750c701..a028bec 100644
    a b uint64 qsqrt(uint64 qdev)  
    918918        x = qdev / x;
    919919        x += y;
    920920        x /= 2;
    921     } while ((x - y) > 1 || (x - y) > -1);
     921    } while ((x - y) > 1 || (x - y) < -1);
    922922
    923923    return (uint64) x;
    924924}