Source-Changes-HG archive

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

[src/trunk]: src/sys/kern A KASSERT() is better.



details:   https://anonhg.NetBSD.org/src/rev/033e062818f5
branches:  trunk
changeset: 796850:033e062818f5
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jun 22 17:23:34 2014 +0000

description:
A KASSERT() is better.

diffstat:

 sys/kern/kern_exec.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 83056fc7967f -r 033e062818f5 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Sun Jun 22 09:48:20 2014 +0000
+++ b/sys/kern/kern_exec.c      Sun Jun 22 17:23:34 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.407 2014/04/25 18:04:45 riastradh Exp $        */
+/*     $NetBSD: kern_exec.c,v 1.408 2014/06/22 17:23:34 maxv Exp $     */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.407 2014/04/25 18:04:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.408 2014/06/22 17:23:34 maxv Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -339,8 +339,8 @@
                return error;
        epp->ep_vp = vp = nd.ni_vp;
        /* normally this can't fail */
-       if ((error = copystr(nd.ni_pnbuf, epp->ep_resolvedname, PATH_MAX, NULL)))
-               goto bad1;
+       error = copystr(nd.ni_pnbuf, epp->ep_resolvedname, PATH_MAX, NULL);
+       KASSERT(error == 0);
 
 #ifdef DIAGNOSTIC
        /* paranoia (take this out once namei stuff stabilizes) */



Home | Main Index | Thread Index | Old Index