Cast size_t variables before printing them to cope with the case of

sizeof(size_t) != sizeof(int).
This commit is contained in:
Thomas Moestl 2001-05-31 22:36:51 +00:00
parent adf08670f2
commit e0038fe587
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77553

View File

@ -604,8 +604,8 @@ size_t len;
quit(23);
}
if (nlen != len) {
fprintf(stderr, "top: sysctl(%s...) expected %d, got %d\n", name,
len, nlen);
fprintf(stderr, "top: sysctl(%s...) expected %lu, got %lu\n", name,
(unsigned long)len, (unsigned long)nlen);
quit(23);
}
}