Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/tmpfs tmpfs_dir_lookup: use 'name' variable in memcmp...



details:   https://anonhg.NetBSD.org/src/rev/ddcc3b6c5220
branches:  trunk
changeset: 765391:ddcc3b6c5220
user:      rmind <rmind%NetBSD.org@localhost>
date:      Wed May 25 00:06:45 2011 +0000

description:
tmpfs_dir_lookup: use 'name' variable in memcmp() as intended; fix warning.

diffstat:

 sys/fs/tmpfs/tmpfs_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6a9d60124fca -r ddcc3b6c5220 sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c Tue May 24 23:30:30 2011 +0000
+++ b/sys/fs/tmpfs/tmpfs_subr.c Wed May 25 00:06:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $    */
+/*     $NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $    */
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/dirent.h>
@@ -494,7 +494,7 @@
        TAILQ_FOREACH(de, &node->tn_spec.tn_dir.tn_dir, td_entries) {
                if (de->td_namelen != nlen)
                        continue;
-               if (memcmp(de->td_name, cnp->cn_nameptr, nlen) != 0)
+               if (memcmp(de->td_name, name, nlen) != 0)
                        continue;
                break;
        }



Home | Main Index | Thread Index | Old Index