Source-Changes-HG archive

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

[src/trunk]: src/sys/kern fix wrong calculation. pointed by enami.



details:   https://anonhg.NetBSD.org/src/rev/b43aa2aa17ee
branches:  trunk
changeset: 546199:b43aa2aa17ee
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 22 13:11:23 2003 +0000

description:
fix wrong calculation. pointed by enami.

diffstat:

 sys/kern/vfs_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6db1ca3ffccc -r b43aa2aa17ee sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Tue Apr 22 13:02:10 2003 +0000
+++ b/sys/kern/vfs_subr.c       Tue Apr 22 13:11:23 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.193 2003/04/18 22:44:45 christos Exp $  */
+/*     $NetBSD: vfs_subr.c,v 1.194 2003/04/22 13:11:23 christos Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.193 2003/04/18 22:44:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.194 2003/04/22 13:11:23 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -2837,7 +2837,7 @@
 
                        if (len < sizeof(sfs->f_mntonname) - 1) {
                                error = (*fun)(onp, &sfs->f_mntonname[len],
-                                   len - sizeof(sfs->f_mntonname) - 1, &size);
+                                   sizeof(sfs->f_mntonname) - len - 1, &size);
                                if (error)
                                        return error;
                                size += len;



Home | Main Index | Thread Index | Old Index