=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/quota/quota.c,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/usr.bin/quota/quota.c 2015/12/09 19:39:10 1.37 --- src/usr.bin/quota/quota.c 2016/03/16 15:41:11 1.38 *************** *** 1,4 **** ! /* $OpenBSD: quota.c,v 1.37 2015/12/09 19:39:10 mmcc Exp $ */ /* * Copyright (c) 1980, 1990, 1993 --- 1,4 ---- ! /* $OpenBSD: quota.c,v 1.38 2016/03/16 15:41:11 krw Exp $ */ /* * Copyright (c) 1980, 1990, 1993 *************** *** 305,311 **** qup->dqblk.dqb_bsoftlimit == 0 && qup->dqblk.dqb_bhardlimit == 0) continue; ! msgi = (char *)0; if (qup->dqblk.dqb_ihardlimit && qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit) msgi = "File limit reached on"; --- 305,311 ---- qup->dqblk.dqb_bsoftlimit == 0 && qup->dqblk.dqb_bhardlimit == 0) continue; ! msgi = NULL; if (qup->dqblk.dqb_ihardlimit && qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit) msgi = "File limit reached on"; *************** *** 316,322 **** else msgi = "Over file quota on"; } ! msgb = (char *)0; if (qup->dqblk.dqb_bhardlimit && qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit) msgb = "Block limit reached on"; --- 316,322 ---- else msgi = "Over file quota on"; } ! msgb = NULL; if (qup->dqblk.dqb_bhardlimit && qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit) msgb = "Block limit reached on"; *************** *** 328,339 **** msgb = "Over block quota on"; } if (qflag) { ! if ((msgi != (char *)0 || msgb != (char *)0) && lines++ == 0) heading(type, id, name, ""); ! if (msgi != (char *)0) printf("\t%s %s\n", msgi, qup->fsname); ! if (msgb != (char *)0) printf("\t%s %s\n", msgb, qup->fsname); continue; } --- 328,339 ---- msgb = "Over block quota on"; } if (qflag) { ! if ((msgi != NULL || msgb != NULL) && lines++ == 0) heading(type, id, name, ""); ! if (msgi != NULL) printf("\t%s %s\n", msgi, qup->fsname); ! if (msgb != NULL) printf("\t%s %s\n", msgb, qup->fsname); continue; } *************** *** 351,369 **** nam, (int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks) / 1024), ! (msgb == (char *)0) ? ' ' : '*', (int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit) / 1024), (int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit) / 1024), ! (msgb == (char *)0) ? "" : timeprt(qup->dqblk.dqb_btime)); printf(" %7d%c %7d %7d %7s\n", qup->dqblk.dqb_curinodes, ! (msgi == (char *)0) ? ' ' : '*', qup->dqblk.dqb_isoftlimit, qup->dqblk.dqb_ihardlimit, ! (msgi == (char *)0) ? "" : timeprt(qup->dqblk.dqb_itime) ); continue; --- 351,369 ---- nam, (int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks) / 1024), ! (msgb == NULL) ? ' ' : '*', (int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit) / 1024), (int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit) / 1024), ! (msgb == NULL) ? "" : timeprt(qup->dqblk.dqb_btime)); printf(" %7d%c %7d %7d %7s\n", qup->dqblk.dqb_curinodes, ! (msgi == NULL) ? ' ' : '*', qup->dqblk.dqb_isoftlimit, qup->dqblk.dqb_ihardlimit, ! (msgi == NULL) ? "" : timeprt(qup->dqblk.dqb_itime) ); continue;