diff options
author | Jos Dehaes <jos.dehaes@gmail.com> | 2021-11-16 21:58:12 +0100 |
---|---|---|
committer | Jos Dehaes <jos.dehaes@gmail.com> | 2021-11-16 21:58:12 +0100 |
commit | d12b4d9d2359c9216ad5977a60de85aea865a92b (patch) | |
tree | ca3e2398122df24ca2b2d6ad4a4e75f1f095510e | |
parent | a6602ff22b4b00ecb7138a09f5c5a15e1b13ca62 (diff) |
readability
-rw-r--r-- | src/freebsd/btop_collect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/freebsd/btop_collect.cpp b/src/freebsd/btop_collect.cpp index 5ffb7a5..f8f2a6b 100644 --- a/src/freebsd/btop_collect.cpp +++ b/src/freebsd/btop_collect.cpp @@ -481,9 +481,9 @@ namespace Mem { if (devstat_getdevs(NULL, &cur) != -1) { for (int i = 0; i < cur.dinfo->numdevs; i++) { - devstat_compute_statistics(&cur.dinfo->devices[i], NULL, etime, DSM_TOTAL_BYTES_READ, &total_bytes_read, - DSM_TOTAL_BYTES_WRITE, &total_bytes_write, DSM_NONE); - Logger::debug("dev " + string(cur.dinfo->devices[i].device_name) + std::to_string(cur.dinfo->devices[i].device_number) + " read=" + std::to_string(total_bytes_read) + " write=" + std::to_string(total_bytes_write)); + auto d = cur.dinfo->devices[i]; + devstat_compute_statistics(&d, NULL, etime, DSM_TOTAL_BYTES_READ, &total_bytes_read, DSM_TOTAL_BYTES_WRITE, &total_bytes_write, DSM_NONE); + Logger::debug("dev " + string(d.device_name) + std::to_string(d.device_number) + " read=" + std::to_string(total_bytes_read) + " write=" + std::to_string(total_bytes_write)); } Logger::debug(""); } |