check SIGAR_FIELD_NOTIMPL in format_size

This commit is contained in:
Doug MacEachern 2005-02-19 02:06:02 +00:00
parent 906df7ae55
commit b1b3171a38
1 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,12 @@ SIGAR_DECLARE(char *) sigar_format_size(sigar_uint64_t size, char *buf)
const char *o = ord;
int remain;
if (size == SIGAR_FIELD_NOTIMPL) {
buf[0] = '-';
buf[1] = '\0';
return buf;
}
if (size < 973) {
sprintf(buf, "%3d ", (int) size);
return buf;