=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/vmstat.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/systat/vmstat.c 1997/11/24 16:19:42 1.11 --- src/usr.bin/systat/vmstat.c 1997/12/19 09:03:34 1.12 *************** *** 1,4 **** ! /* $OpenBSD: vmstat.c,v 1.11 1997/11/24 16:19:42 kstailey Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: vmstat.c,v 1.12 1997/12/19 09:03:34 deraadt Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif ! static char rcsid[] = "$OpenBSD: vmstat.c,v 1.11 1997/11/24 16:19:42 kstailey Exp $"; #endif /* not lint */ /* --- 38,44 ---- #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif ! static char rcsid[] = "$OpenBSD: vmstat.c,v 1.12 1997/12/19 09:03:34 deraadt Exp $"; #endif /* not lint */ /* *************** *** 604,610 **** addch(' '); return; } ! sprintf(b, "%*d", w, n); if (strlen(b) > w) { while (w-- > 0) addch('*'); --- 604,610 ---- addch(' '); return; } ! snprintf(b, sizeof b, "%*d", w, n); if (strlen(b) > w) { while (w-- > 0) addch('*'); *************** *** 626,632 **** addch(' '); return; } ! sprintf(b, "%*.*f", w, d, f); if (strlen(b) > w) { while (--w >= 0) addch('*'); --- 626,632 ---- addch(' '); return; } ! snprintf(b, sizeof b, "%*.*f", w, d, f); if (strlen(b) > w) { while (--w >= 0) addch('*');