Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
format_SI: remove a ternary i can never equal 0 here
Baptiste Daroussin committed 4 years ago
commit 3d76fe4d02754e5c0752363c0cfc5ffd63745f7b
parent abb7bf7
1 file changed +2 -3
modified src/event.c
@@ -119,11 +119,10 @@ format_rate_SI(char *buf, int size, off_t bytes)
		i++;
		bytes = (bytes + 500) / 1000;
	}
-
	snprintf(buf, size, "%3lld.%1lld%s%s",
+
	snprintf(buf, size, "%3lld.%1lld%sB",
	    (long long) (bytes + 5) / 100,
	    (long long) (bytes + 5) / 10 % 10,
-
	    unit_SI[i],
-
	    i ? "B" : " ");
+
	    unit_SI[i]);
}

void