Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Make this compile on vax (uninitialized use warning).
details: https://anonhg.NetBSD.org/src/rev/9e99ffa3bf81
branches: trunk
changeset: 773435:9e99ffa3bf81
user: matt <matt%NetBSD.org@localhost>
date: Thu Feb 02 03:00:48 2012 +0000
description:
Make this compile on vax (uninitialized use warning).
diffstat:
sys/ufs/ufs/ufs_quota1.c | 12 +++++-------
usr.sbin/quotactl/proplib-interpreter.c | 5 +++--
2 files changed, 8 insertions(+), 9 deletions(-)
diffs (67 lines):
diff -r 04cde8bc9344 -r 9e99ffa3bf81 sys/ufs/ufs/ufs_quota1.c
--- a/sys/ufs/ufs/ufs_quota1.c Thu Feb 02 02:47:59 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota1.c Thu Feb 02 03:00:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota1.c,v 1.17 2012/02/01 05:43:54 dholland Exp $ */
+/* $NetBSD: ufs_quota1.c,v 1.18 2012/02/02 03:00:48 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota1.c,v 1.17 2012/02/01 05:43:54 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota1.c,v 1.18 2012/02/02 03:00:48 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -611,19 +611,17 @@
dqb.dqb_curinodes = dq->dq_curinodes;
dqb.dqb_btime = dq->dq_btime;
dqb.dqb_itime = dq->dq_itime;
- switch (key->qk_objtype) {
- case QUOTA_OBJTYPE_BLOCKS:
+ if (key->qk_objtype == QUOTA_OBJTYPE_BLOCKS) {
dqb.dqb_bsoftlimit = quota1_encode_limit(val->qv_softlimit);
dqb.dqb_bhardlimit = quota1_encode_limit(val->qv_hardlimit);
dqb.dqb_isoftlimit = dq->dq_isoftlimit;
dqb.dqb_ihardlimit = dq->dq_ihardlimit;
- break;
- case QUOTA_OBJTYPE_FILES:
+ } else {
+ KASSERT(key->qk_objtype == QUOTA_OBJTYPE_FILES);
dqb.dqb_bsoftlimit = dq->dq_bsoftlimit;
dqb.dqb_bhardlimit = dq->dq_bhardlimit;
dqb.dqb_isoftlimit = quota1_encode_limit(val->qv_softlimit);
dqb.dqb_ihardlimit = quota1_encode_limit(val->qv_hardlimit);
- break;
}
if (dq->dq_id == 0 && val->qv_grace != QUOTA_NOTIME) {
/* also update grace time if available */
diff -r 04cde8bc9344 -r 9e99ffa3bf81 usr.sbin/quotactl/proplib-interpreter.c
--- a/usr.sbin/quotactl/proplib-interpreter.c Thu Feb 02 02:47:59 2012 +0000
+++ b/usr.sbin/quotactl/proplib-interpreter.c Thu Feb 02 03:00:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proplib-interpreter.c,v 1.3 2012/01/30 19:31:31 dholland Exp $ */
+/* $NetBSD: proplib-interpreter.c,v 1.4 2012/02/02 03:01:42 matt Exp $ */
/*
* Copyright (c) 1991, 1993, 1994
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: proplib-interpreter.c,v 1.3 2012/01/30 19:31:31 dholland Exp $");
+__RCSID("$NetBSD: proplib-interpreter.c,v 1.4 2012/02/02 03:01:42 matt Exp $");
#include <stdlib.h>
#include <string.h>
@@ -606,6 +606,7 @@
num = quotacursor_getn(cursor, keys, vals, loopmax);
if (num < 0) {
error = errno;
+ loopnum = -1;
} else {
error = 0;
loopnum = num;
Home |
Main Index |
Thread Index |
Old Index