check SIGAR_FIELD_NOTIMPL in format_size
This commit is contained in:
parent
906df7ae55
commit
b1b3171a38
@ -184,6 +184,12 @@ SIGAR_DECLARE(char *) sigar_format_size(sigar_uint64_t size, char *buf)
|
|||||||
const char *o = ord;
|
const char *o = ord;
|
||||||
int remain;
|
int remain;
|
||||||
|
|
||||||
|
if (size == SIGAR_FIELD_NOTIMPL) {
|
||||||
|
buf[0] = '-';
|
||||||
|
buf[1] = '\0';
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
if (size < 973) {
|
if (size < 973) {
|
||||||
sprintf(buf, "%3d ", (int) size);
|
sprintf(buf, "%3d ", (int) size);
|
||||||
return buf;
|
return buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user