svn commit: r315557 - stable/11/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Sun Mar 19 15:44:09 UTC 2017
Author: kib
Date: Sun Mar 19 15:44:08 2017
New Revision: 315557
URL: https://svnweb.freebsd.org/changeset/base/315557
Log:
MFC r315156:
Style.
Modified:
stable/11/sys/kern/imgact_elf.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/imgact_elf.c
==============================================================================
--- stable/11/sys/kern/imgact_elf.c Sun Mar 19 15:32:12 2017 (r315556)
+++ stable/11/sys/kern/imgact_elf.c Sun Mar 19 15:44:08 2017 (r315557)
@@ -508,7 +508,7 @@ __elfN(load_section)(struct image_params
size_t map_len;
vm_map_t map;
vm_object_t object;
- vm_offset_t map_addr;
+ vm_offset_t off, map_addr;
int error, rv, cow;
size_t copy_len;
vm_ooffset_t file_addr;
@@ -559,9 +559,8 @@ __elfN(load_section)(struct image_params
return (EINVAL);
/* we can stop now if we've covered it all */
- if (memsz == filsz) {
+ if (memsz == filsz)
return (0);
- }
}
@@ -580,14 +579,11 @@ __elfN(load_section)(struct image_params
if (map_len != 0) {
rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr,
map_addr + map_len, VM_PROT_ALL, 0);
- if (rv != KERN_SUCCESS) {
+ if (rv != KERN_SUCCESS)
return (EINVAL);
- }
}
if (copy_len != 0) {
- vm_offset_t off;
-
sf = vm_imgact_map_page(object, offset + filsz);
if (sf == NULL)
return (EIO);
@@ -598,14 +594,12 @@ __elfN(load_section)(struct image_params
error = copyout((caddr_t)sf_buf_kva(sf) + off,
(caddr_t)map_addr, copy_len);
vm_imgact_unmap_page(sf);
- if (error) {
+ if (error != 0)
return (error);
- }
}
/*
* set it to the specified protection.
- * XXX had better undo the damage from pasting over the cracks here!
*/
vm_map_protect(map, trunc_page(map_addr), round_page(map_addr +
map_len), prot, FALSE);
More information about the svn-src-stable-11
mailing list