svn commit: r217250 - head/sys/kern
Lawrence Stewart
lstewart at FreeBSD.org
Tue Jan 11 01:11:07 UTC 2011
Author: lstewart
Date: Tue Jan 11 01:11:07 2011
New Revision: 217250
URL: http://svn.freebsd.org/changeset/base/217250
Log:
Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised.
Sponsored by: FreeBSD Foundation
Submitted by: pjd
MFC after: 9 weeks
X-MFC with: r216615
Modified:
head/sys/kern/kern_hhook.c
Modified: head/sys/kern/kern_hhook.c
==============================================================================
--- head/sys/kern/kern_hhook.c Tue Jan 11 00:58:49 2011 (r217249)
+++ head/sys/kern/kern_hhook.c Tue Jan 11 01:11:07 2011 (r217250)
@@ -380,11 +380,12 @@ hhook_head_is_virtualised(struct hhook_h
{
uint32_t ret;
- if (hhh == NULL)
- return (0);
+ ret = 0;
- if (hhh->hhh_flags & HHH_ISINVNET)
- ret = HHOOK_HEADISINVNET;
+ if (hhh != NULL) {
+ if (hhh->hhh_flags & HHH_ISINVNET)
+ ret = HHOOK_HEADISINVNET;
+ }
return (ret);
}
More information about the svn-src-all
mailing list