diff options
-rw-r--r-- | sys/kern/imgact_elf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 29c1f4939d52..1cc071b5d4e7 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -405,7 +405,7 @@ __elfN(map_partial)(vm_map_t map, vm_object_t object, vm_ooffset_t offset, /* * Find the page from the underlying object. */ - if (object) { + if (object != NULL) { sf = vm_imgact_map_page(object, offset); if (sf == NULL) return (KERN_FAILURE); @@ -433,7 +433,7 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object, if (start != trunc_page(start)) { rv = __elfN(map_partial)(map, object, offset, start, round_page(start), prot); - if (rv) + if (rv != KERN_SUCCESS) return (rv); offset += round_page(start) - start; start = round_page(start); @@ -441,7 +441,7 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object, if (end != round_page(end)) { rv = __elfN(map_partial)(map, object, offset + trunc_page(end) - start, trunc_page(end), end, prot); - if (rv) + if (rv != KERN_SUCCESS) return (rv); end = trunc_page(end); } @@ -531,7 +531,7 @@ __elfN(load_section)(struct image_params *imgp, vm_offset_t offset, * We have two choices. We can either clear the data in the last page * of an oversized mapping, or we can start the anon mapping a page * early and copy the initialized data into that first page. We - * choose the second.. + * choose the second. */ if (memsz > filsz) map_len = trunc_page_ps(offset + filsz, pagesize) - file_addr; |