Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/repquota Don't use the same char b0[] for BLOCK and...
details: https://anonhg.NetBSD.org/src/rev/788bac39be47
branches: trunk
changeset: 762987:788bac39be47
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Mar 07 11:56:31 2011 +0000
description:
Don't use the same char b0[] for BLOCK and FILE timeprt(), they would
override each others.
diffstat:
usr.sbin/repquota/repquota.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 49cdd50e091e -r 788bac39be47 usr.sbin/repquota/repquota.c
--- a/usr.sbin/repquota/repquota.c Mon Mar 07 11:46:55 2011 +0000
+++ b/usr.sbin/repquota/repquota.c Mon Mar 07 11:56:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: repquota.c,v 1.28 2011/03/06 23:25:42 christos Exp $ */
+/* $NetBSD: repquota.c,v 1.29 2011/03/07 11:56:31 bouyer Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)repquota.c 8.2 (Berkeley) 11/22/94";
#else
-__RCSID("$NetBSD: repquota.c,v 1.28 2011/03/06 23:25:42 christos Exp $");
+__RCSID("$NetBSD: repquota.c,v 1.29 2011/03/07 11:56:31 bouyer Exp $");
#endif
#endif /* not lint */
@@ -387,7 +387,7 @@
const char *timemsg[N_QL];
char overchar[N_QL];
time_t now;
- char b0[20], b1[20], b2[20], b3[20];
+ char b0[2][20], b1[20], b2[20], b3[20];
switch(type) {
case GRPQUOTA:
@@ -435,12 +435,13 @@
case QL_S_DENY_HARD:
case QL_S_DENY_GRACE:
case QL_S_ALLOW_SOFT:
- timemsg[i] = timeprt(b0, 8, now, q[i].q2v_time);
+ timemsg[i] = timeprt(b0[i], 8, now,
+ q[i].q2v_time);
overchar[i] = '+';
break;
default:
timemsg[i] = (vflag && version == 2) ?
- timeprt(b0, 8, 0, q[i].q2v_grace) : "";
+ timeprt(b0[i], 8, 0, q[i].q2v_grace) : "";
overchar[i] = '-';
break;
}
Home |
Main Index |
Thread Index |
Old Index