[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 22/98: mach-defpager: fix the page offsets returned by pager_page
From: |
Samuel Thibault |
Subject: |
[hurd] 22/98: mach-defpager: fix the page offsets returned by pager_pages |
Date: |
Tue, 14 Jan 2014 01:59:59 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit dc96b68a826a652d514f994d1f7932fb6fff87a7
Author: Justus Winter <address@hidden>
Date: Fri Nov 15 12:57:27 2013 +0100
mach-defpager: fix the page offsets returned by pager_pages
Previously the increment was outside the loop body, turning it into a
dead increment.
Move the increment into the loop body as it is done in the true branch
above. This fixes the offsets recorded in the default_pager_page_t
objects.
Found using the Clang Static Analyzer.
* mach-defpager/default_pager.c (pager_pages): Fix returned page offsets.
---
mach-defpager/default_pager.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index 8e466f7..a65a5fe 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -879,12 +879,13 @@ pager_pages(pager, pages, numpages)
offset += vm_page_size;
}
} else {
- for (emap = &map[size]; map < emap; map++)
+ for (emap = &map[size]; map < emap; map++) {
if ( ! no_block(*map) ) {
if (actual++ < numpages)
pages++->dpp_offset = offset;
}
- offset += vm_page_size;
+ offset += vm_page_size;
+ }
}
return actual;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (90b039d -> 5aa7b58), Samuel Thibault, 2014/01/13
- [hurd] 22/98: mach-defpager: fix the page offsets returned by pager_pages,
Samuel Thibault <=
- [hurd] 28/98: utils: fix dead initialization, Samuel Thibault, 2014/01/13
- [hurd] 29/98: libps: fix the length computation in fprint_frac_value, Samuel Thibault, 2014/01/13
- [hurd] 27/98: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/01/13
- [hurd] 35/98: libshouldbeinlibc: fix error handling in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 25/98: libports: implement lockless management of threads, Samuel Thibault, 2014/01/13
- [hurd] 33/98: usermux: actually use the computed flags value in netfs_attempt_utimes, Samuel Thibault, 2014/01/13
- [hurd] 32/98: nfsd: fix error handling in op_remove, Samuel Thibault, 2014/01/13
- [hurd] 30/98: fatfs: fix error handling in diskfs_lookup_hard, Samuel Thibault, 2014/01/13
- [hurd] 42/98: libports: improve error handling in ports_transfer_right, Samuel Thibault, 2014/01/13
- [hurd] 43/98: libdiskfs: improve error reporting in diskfs_start_disk_pager, Samuel Thibault, 2014/01/13