]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r249334 and r249384:
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 19 Apr 2013 03:55:54 +0000 (03:55 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 19 Apr 2013 03:55:54 +0000 (03:55 +0000)
commit207802e9b446a3d7099a5a1a8a040452264040ab
treeb3fbb3972d373f321b1ddb7f1270897b4d609822
parente6f691df8040c61bb35e11cdf10c98184322a4a6
MFC r249334 and r249384:

  ------------------------------------------------------------------------
  r249334 | ken | 2013-04-10 10:01:45 -0600 (Wed, 10 Apr 2013) | 11 lines

  Fix a time calculation error in ctlstat_standard().

  ctlstat.c: When converting a timeval to a floating point
number in ctlstat_standard(), cast the nanoseconds
calculation to a long double, so we don't lose
precision.  Without the cast, we wind up with a
time in whole seconds only.

  Sponsored by:   Spectra Logic
  ------------------------------------------------------------------------
  r249384 | ken | 2013-04-11 15:18:04 -0600 (Thu, 11 Apr 2013) | 17 lines

  Fix bugs in the elapsed time calculation in ctlstat_standard()
  pointed out by bde:

  - Casting to long double isn't needed.
  - The division isn't needed, multiplication can be used.
    "When 1 nanosecond is in a floating point literal, the whole
    expression is automatically promoted correctly."
  - non-KNF indentation (1 tab) for the newly split line
  - different non-KNF indentation (5 spaces) for the previously split
    line
  - exessive parentheses around the division operation
  - bogus blank line which splits up the etime initialization
  - general verboseness from the above.

  Submitted by:   bde

Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/9@249632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/ctlstat/ctlstat.c