Print size_t's with %zu rather than "%zd.
Reviewed by: bde
This commit is contained in:
parent
b575067a21
commit
cf7f8a9de8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280680
@ -373,7 +373,7 @@ machine_init(struct statics *statics, char do_unames)
|
|||||||
size = sizeof(long) * maxcpu * CPUSTATES;
|
size = sizeof(long) * maxcpu * CPUSTATES;
|
||||||
times = malloc(size);
|
times = malloc(size);
|
||||||
if (times == NULL)
|
if (times == NULL)
|
||||||
err(1, "malloc %zd bytes", size);
|
err(1, "malloc %zu bytes", size);
|
||||||
if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1)
|
if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1)
|
||||||
err(1, "sysctlbyname kern.cp_times");
|
err(1, "sysctlbyname kern.cp_times");
|
||||||
pcpu_cp_time = calloc(1, size);
|
pcpu_cp_time = calloc(1, size);
|
||||||
@ -1004,7 +1004,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags)
|
|||||||
argbuflen = cmdlen * 4;
|
argbuflen = cmdlen * 4;
|
||||||
argbuf = (char *)malloc(argbuflen + 1);
|
argbuf = (char *)malloc(argbuflen + 1);
|
||||||
if (argbuf == NULL) {
|
if (argbuf == NULL) {
|
||||||
warn("malloc(%zd)", argbuflen + 1);
|
warn("malloc(%zu)", argbuflen + 1);
|
||||||
free(cmdbuf);
|
free(cmdbuf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user