Field width and precision specifier arguments to printf must be ints.

This commit is contained in:
kleink 2005-03-09 19:09:05 +00:00
parent d86d0ac991
commit fcbd09f9f1
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sockstat.c,v 1.2 2005/03/09 05:53:47 atatat Exp $ */
/* $NetBSD: sockstat.c,v 1.3 2005/03/09 19:09:05 kleink Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: sockstat.c,v 1.2 2005/03/09 05:53:47 atatat Exp $");
__RCSID("$NetBSD: sockstat.c,v 1.3 2005/03/09 19:09:05 kleink Exp $");
#endif
#include <sys/param.h>
@ -529,7 +529,7 @@ print_socket(struct kinfo_file *kf, struct kinfo_pcb *kp, struct kinfo_proc2 *p)
else
printf("%-8d ", (int)p->p_uid);
printf("%-10.*s ", sizeof(p->p_comm), p->p_comm);
printf("%-10.*s ", (int)sizeof(p->p_comm), p->p_comm);
printf("%-5d ", (int)kf->ki_pid);
printf("%2d ", (int)kf->ki_fd);