Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rpc.lockd allow comparing v2 and v3 filehandles.
details: https://anonhg.NetBSD.org/src/rev/fdb836b4654a
branches: trunk
changeset: 749164:fdb836b4654a
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 19 22:27:26 2009 +0000
description:
allow comparing v2 and v3 filehandles.
diffstat:
usr.sbin/rpc.lockd/lockd_lock.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (22 lines):
diff -r 7779e4f62225 -r fdb836b4654a usr.sbin/rpc.lockd/lockd_lock.c
--- a/usr.sbin/rpc.lockd/lockd_lock.c Thu Nov 19 22:13:17 2009 +0000
+++ b/usr.sbin/rpc.lockd/lockd_lock.c Thu Nov 19 22:27:26 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lockd_lock.c,v 1.30 2009/10/19 18:41:17 bouyer Exp $ */
+/* $NetBSD: lockd_lock.c,v 1.31 2009/11/19 22:27:26 christos Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -57,11 +57,7 @@
static int
fhcmp(const nfs_fhandle_t *fh1, const nfs_fhandle_t *fh2)
{
-
- if (fh1->fhsize != fh2->fhsize) {
- return 1;
- }
- return memcmp(fh1->fhdata, fh2->fhdata, fh1->fhsize);
+ return memcmp(fh1->fhdata, fh2->fhdata, MIN(fh1->fhsize, fh2->fhsize));
}
static int
Home |
Main Index |
Thread Index |
Old Index