Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/udf udf_gro_genealogy() : source and destination shou...



details:   https://anonhg.NetBSD.org/src/rev/529e7db1b75a
branches:  trunk
changeset: 787922:529e7db1b75a
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat Jul 13 19:42:26 2013 +0000

description:
udf_gro_genealogy() : source and destination should never be the same on call,
KASSERT it instead of checking for it.

diffstat:

 sys/fs/udf/udf_rename.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r a1484e3cb4b7 -r 529e7db1b75a sys/fs/udf/udf_rename.c
--- a/sys/fs/udf/udf_rename.c   Sat Jul 13 19:40:14 2013 +0000
+++ b/sys/fs/udf/udf_rename.c   Sat Jul 13 19:42:26 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_rename.c,v 1.7 2013/07/13 19:40:14 reinoud Exp $ */
+/* $NetBSD: udf_rename.c,v 1.8 2013/07/13 19:42:26 reinoud Exp $ */
 
 /*
  * Copyright (c) 2013 Reinoud Zandijk
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.7 2013/07/13 19:40:14 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.8 2013/07/13 19:42:26 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -542,8 +542,7 @@
        ump = target->ump;
 
        /* if nodes are equal, it is no use looking */
-       if (udf_compare_icb(&source->loc, &target->loc) == 0)
-               return EEXIST;
+       KASSERT(udf_compare_icb(&source->loc, &target->loc) != 0);
 
        child_node = target;
        vref(child_node->vnode);



Home | Main Index | Thread Index | Old Index