summaryrefslogtreecommitdiff
path: root/usr.sbin/repquota
diff options
context:
space:
mode:
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);
}