mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
util: treat -1 as special size in format_bytes()
This commit is contained in:
@@ -5184,6 +5184,9 @@ char *format_bytes(char *buf, size_t l, off_t t) {
|
||||
{ "K", 1024ULL },
|
||||
};
|
||||
|
||||
if (t == (off_t) -1)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < ELEMENTSOF(table); i++) {
|
||||
|
||||
if (t >= table[i].factor) {
|
||||
|
||||
Reference in New Issue
Block a user