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 Test the correct pointer 'rfl' rather tha...



details:   https://anonhg.NetBSD.org/src/rev/3726b877f24f
branches:  trunk
changeset: 581516:3726b877f24f
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 09:30:27 2005 +0000

description:
Test the correct pointer 'rfl' rather than an uninitialized 'fl' when
determining whether the lock was a LOCK_V4 or not.
Detected with gcc -Wuninitialized.

diffstat:

 usr.sbin/rpc.lockd/lockd_lock.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r b12194f6d3f4 -r 3726b877f24f usr.sbin/rpc.lockd/lockd_lock.c
--- a/usr.sbin/rpc.lockd/lockd_lock.c   Thu Jun 02 09:21:01 2005 +0000
+++ b/usr.sbin/rpc.lockd/lockd_lock.c   Thu Jun 02 09:30:27 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lockd_lock.c,v 1.20 2003/10/05 17:48:50 bouyer Exp $   */
+/*     $NetBSD: lockd_lock.c,v 1.21 2005/06/02 09:30:27 lukem Exp $    */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -656,13 +656,13 @@
                        error = nlm4_stale_fh;
                else
                        error = nlm4_failed;
-               if ((fl->flags & LOCK_V4) == 0)
+               if ((rfl->flags & LOCK_V4) == 0)
                        error = nlm_denied;
                syslog(LOG_NOTICE,
                    "close failed (from %s): %s",
                    rfl->client_name, strerror(errno));
        } else {
-               error = (fl->flags & LOCK_V4) ?
+               error = (rfl->flags & LOCK_V4) ?
                    nlm4_granted : nlm_granted;
        }
        LIST_REMOVE(rfl, lcklst);



Home | Main Index | Thread Index | Old Index