Module Name: src
Committed By: maxv
Date: Sun Jun 22 17:23:34 UTC 2014
Modified Files:
src/sys/kern: kern_exec.c
Log Message:
A KASSERT() is better.
To generate a diff of this commit:
cvs rdiff -u -r1.407 -r1.408 src/sys/kern/kern_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.407 src/sys/kern/kern_exec.c:1.408
--- src/sys/kern/kern_exec.c:1.407 Fri Apr 25 18:04:45 2014
+++ src/sys/kern/kern_exec.c Sun Jun 22 17:23:34 2014
@@ -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 @@ check_exec(struct lwp *l, struct exec_pa
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) */