Module Name: src
Committed By: snj
Date: Tue Dec 1 19:48:05 UTC 2009
Modified Files:
src/usr.sbin/rpc.lockd [netbsd-5]: lockd_lock.c
Log Message:
Pull up following revision(s) (requested by tron in ticket #1174):
usr.sbin/rpc.lockd/lockd_lock.c: revision 1.31
allow comparing v2 and v3 filehandles.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.28.12.1 src/usr.sbin/rpc.lockd/lockd_lock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rpc.lockd/lockd_lock.c
diff -u src/usr.sbin/rpc.lockd/lockd_lock.c:1.28 src/usr.sbin/rpc.lockd/lockd_lock.c:1.28.12.1
--- src/usr.sbin/rpc.lockd/lockd_lock.c:1.28 Sun Nov 4 23:12:50 2007
+++ src/usr.sbin/rpc.lockd/lockd_lock.c Tue Dec 1 19:48:05 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lockd_lock.c,v 1.28 2007/11/04 23:12:50 christos Exp $ */
+/* $NetBSD: lockd_lock.c,v 1.28.12.1 2009/12/01 19:48:05 snj Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -62,11 +62,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