Fixed some style bugs (mainly, try to always use explicit comparisons with

NULL when checking for null pointers).
This commit is contained in:
Bruce Evans 2003-12-28 04:37:59 +00:00
parent ca46e90ef4
commit d6c847f378
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123924

View File

@ -415,7 +415,7 @@ kern_execve(td, fname, argv, envv, mac_p)
* let it do the stack setup.
* Else stuff argument count as first item on stack
*/
if (p->p_sysent->sv_fixup)
if (p->p_sysent->sv_fixup != NULL)
(*p->p_sysent->sv_fixup)(&stack_base, imgp);
else
suword(--stack_base, imgp->argc);
@ -673,10 +673,10 @@ kern_execve(td, fname, argv, envv, mac_p)
/*
* free various allocated resources
*/
if (imgp->firstpage)
if (imgp->firstpage != NULL)
exec_unmap_first_page(imgp);
if (imgp->vp) {
if (imgp->vp != NULL) {
NDFREE(ndp, NDF_ONLY_PNBUF);
vput(imgp->vp);
}
@ -685,7 +685,7 @@ kern_execve(td, fname, argv, envv, mac_p)
kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
ARG_MAX + PAGE_SIZE);
if (imgp->object)
if (imgp->object != NULL)
vm_object_deallocate(imgp->object);
if (error == 0) {
@ -735,9 +735,8 @@ exec_map_first_page(imgp)
GIANT_REQUIRED;
if (imgp->firstpage) {
if (imgp->firstpage != NULL)
exec_unmap_first_page(imgp);
}
VOP_GETVOBJECT(imgp->vp, &object);
VM_OBJECT_LOCK(object);
@ -796,7 +795,7 @@ exec_unmap_first_page(imgp)
struct image_params *imgp;
{
if (imgp->firstpage) {
if (imgp->firstpage != NULL) {
pmap_qremove((vm_offset_t)imgp->image_header, 1);
vm_page_lock_queues();
vm_page_unwire(imgp->firstpage, 1);
@ -833,7 +832,7 @@ exec_new_vmspace(imgp, sv)
* data size limit may need to be changed to a value that makes
* sense for the 32 bit binary.
*/
if (sv->sv_fixlimits)
if (sv->sv_fixlimits != NULL)
sv->sv_fixlimits(imgp);
/*