systat: Don't revert to bits if >1024GB.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sat, 27 Aug 2011 21:08:04 +0000 (14:08 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sat, 27 Aug 2011 21:08:04 +0000 (14:08 -0700)
usr.bin/systat/convtbl.c

index 7fc1a6e..2443c59 100644 (file)
@@ -70,7 +70,7 @@ get_tbl_ptr(const u_long size, const u_int scale)
                 * index as the array index into the conversion table.
                 */
                for (tmp = size, index = SC_KILOBYTE;
-                    tmp >= MEGA && index <= SC_GIGABYTE;
+                    tmp >= MEGA && index < SC_GIGABYTE;
                     tmp >>= 10, index++);
 
        tbl_ptr = &convtbl[index];