Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2011 08:11:04 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227874 - head/sys/kern
Message-ID:  <201111230811.pAN8B4sk034173@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Wed Nov 23 08:11:04 2011
New Revision: 227874
URL: http://svn.freebsd.org/changeset/base/227874

Log:
  Fix build without INVARIANTS.
  
  Discussed with:	kib

Modified:
  head/sys/kern/kern_proc.c

Modified: head/sys/kern/kern_proc.c
==============================================================================
--- head/sys/kern/kern_proc.c	Wed Nov 23 07:34:09 2011	(r227873)
+++ head/sys/kern/kern_proc.c	Wed Nov 23 08:11:04 2011	(r227874)
@@ -1468,6 +1468,7 @@ get_proc_vector32(struct thread *td, str
 		break;
 	default:
 		KASSERT(0, ("Wrong proc vector type: %d", type));
+		return (EINVAL);
 	}
 	proc_vector32 = malloc(size, M_TEMP, M_WAITOK);
 	error = proc_read_mem(td, p, vptr, proc_vector32, size);
@@ -1564,6 +1565,7 @@ get_proc_vector(struct thread *td, struc
 		break;
 	default:
 		KASSERT(0, ("Wrong proc vector type: %d", type));
+		return (EINVAL); /* In case we are built without INVARIANTS. */
 	}
 	proc_vector = malloc(size, M_TEMP, M_WAITOK);
 	if (proc_vector == NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111230811.pAN8B4sk034173>