summaryrefslogtreecommitdiff
path: root/usr.sbin/edquota/edquota.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:47:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-29 09:47:21 +0000
commit0f255ec3ff0a620b4f8064781b438d7cf26407f5 (patch)
tree1bb9fd29dc494cb1f0a29e53d941403dec213d22 /usr.sbin/edquota/edquota.c
parentef1b3f9682539a42c2f5cd67e47ef048adb5f498 (diff)
more snprintf
Diffstat (limited to 'usr.sbin/edquota/edquota.c')
-rw-r--r--usr.sbin/edquota/edquota.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index 74c8ac0bb9f..56e7a38a54b 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)edquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: edquota.c,v 1.31 2002/05/26 09:25:21 deraadt Exp $";
+static char *rcsid = "$Id: edquota.c,v 1.32 2002/05/29 09:47:20 deraadt Exp $";
#endif /* not lint */
/*
@@ -674,18 +674,18 @@ cvtstoa(time)
if (time % (24 * 60 * 60) == 0) {
time /= 24 * 60 * 60;
- (void)sprintf(buf, "%d day%s", (int)time,
+ (void)snprintf(buf, sizeof buf, "%d day%s", (int)time,
time == 1 ? "" : "s");
} else if (time % (60 * 60) == 0) {
time /= 60 * 60;
- (void)sprintf(buf, "%d hour%s", (int)time,
+ (void)snprintf(buf, sizeof buf, "%d hour%s", (int)time,
time == 1 ? "" : "s");
} else if (time % 60 == 0) {
time /= 60;
- (void)sprintf(buf, "%d minute%s", (int)time,
+ (void)snprintf(buf, sizeof buf, "%d minute%s", (int)time,
time == 1 ? "" : "s");
} else
- (void)sprintf(buf, "%d second%s", (int)time,
+ (void)snprintf(buf, sizeof buf, "%d second%s", (int)time,
time == 1 ? "" : "s");
return(buf);
}