summaryrefslogtreecommitdiff
path: root/usr.sbin/repquota
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:45:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:45:09 +0000
commitb19caa201f0c1b7d209365f918f8322db3d568f1 (patch)
tree514074de149a63767f65aa2125ba2e1465960b7e /usr.sbin/repquota
parente202c9c7632308262151bf90c05613696fe91270 (diff)
more sprintf
Diffstat (limited to 'usr.sbin/repquota')
-rw-r--r--usr.sbin/repquota/repquota.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c
index 269bfeebecc..e63edea5356 100644
--- a/usr.sbin/repquota/repquota.c
+++ b/usr.sbin/repquota/repquota.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)repquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: repquota.c,v 1.16 2002/03/14 16:44:25 mpech Exp $";
+static char *rcsid = "$Id: repquota.c,v 1.17 2002/05/29 09:45:08 deraadt Exp $";
#endif /* not lint */
/*
@@ -388,13 +388,14 @@ timeprt(seconds)
minutes = (seconds + 30) / 60;
hours = (minutes + 30) / 60;
if (hours >= 36) {
- sprintf(buf, "%ddays", (hours + 12) / 24);
+ snprintf(buf, sizeof buf, "%ddays", (hours + 12) / 24);
return (buf);
}
if (minutes >= 60) {
- sprintf(buf, "%2d:%d", minutes / 60, minutes % 60);
+ snprintf(buf, sizeof buf, "%2d:%d", minutes / 60,
+ minutes % 60);
return (buf);
}
- sprintf(buf, "%2d", minutes);
+ snprintf(buf, sizeof buf, "%2d", minutes);
return (buf);
}