[BACK]Return to ping6.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / ping6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sbin/ping6/ping6.c between version 1.72 and 1.73

version 1.72, 2009/04/11 07:45:48 version 1.73, 2010/09/20 11:49:48
Line 2109  summary(void)
Line 2109  summary(void)
         if (nreceived && timing) {          if (nreceived && timing) {
                 /* Only display average to microseconds */                  /* Only display average to microseconds */
                 double num = nreceived + nrepeats;                  double num = nreceived + nrepeats;
                 double avg = tsum / num;                  double dev, avg;
                 double dev = sqrt((tsumsq - num * avg * avg) / (num - 1));                  if (num > 1) {
                           avg = tsum / num;
                           dev = sqrt((tsumsq - num * avg * avg) / (num - 1));
                   } else {
                           avg = tsum;
                           dev = 0.0;
                   }
                 (void)printf(                  (void)printf(
                     "round-trip min/avg/max/std-dev = %.3f/%.3f/%.3f/%.3f ms\n",                      "round-trip min/avg/max/std-dev = %.3f/%.3f/%.3f/%.3f ms\n",
                     tmin, avg, tmax, dev);                      tmin, avg, tmax, dev);

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

CVSweb <webmaster@jp.NetBSD.org>