Module Name:    src
Committed By:   christos
Date:           Thu Nov 19 22:27:26 UTC 2009

Modified Files:
        src/usr.sbin/rpc.lockd: lockd_lock.c

Log Message:
allow comparing v2 and v3 filehandles.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 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.30 src/usr.sbin/rpc.lockd/lockd_lock.c:1.31
--- src/usr.sbin/rpc.lockd/lockd_lock.c:1.30	Mon Oct 19 14:41:17 2009
+++ src/usr.sbin/rpc.lockd/lockd_lock.c	Thu Nov 19 17:27:26 2009
@@ -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

Reply via email to