Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs Use an explicit compare to 0 for an immediate er...
details: https://anonhg.NetBSD.org/src/rev/cdc40d23225e
branches: trunk
changeset: 330464:cdc40d23225e
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Jul 10 06:02:40 2014 +0000
description:
Use an explicit compare to 0 for an immediate error result, not !.
Using ! is perfectly clear on variables like "error" or "result",
but directly on a function call it tends to look like a mistake.
diffstat:
sys/ufs/ffs/ffs_snapshot.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 9b886e4d0c5b -r cdc40d23225e sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c Wed Jul 09 23:41:40 2014 +0000
+++ b/sys/ufs/ffs/ffs_snapshot.c Thu Jul 10 06:02:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $ */
+/* $NetBSD: ffs_snapshot.c,v 1.136 2014/07/10 06:02:40 dholland Exp $ */
/*
* Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.135 2014/05/30 08:40:09 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.136 2014/07/10 06:02:40 dholland Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -399,7 +399,7 @@
#endif
}
if (error) {
- if (!UFS_WAPBL_BEGIN(mp)) {
+ if (UFS_WAPBL_BEGIN(mp) == 0) {
(void) ffs_truncate(vp, (off_t)0, 0, NOCRED);
UFS_WAPBL_END(mp);
}
Home |
Main Index |
Thread Index |
Old Index