From cfe11d7465d410cd281f0cdf3296545c0243be2b Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 11 May 2000 22:30:45 +0000 Subject: [PATCH] * mmap.cc (list::erase): Increment loop counter. (map::erase): Likewise. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/mmap.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 82c295a28..1f5475995 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2000-05-11 Mumit Khan + + * mmap.cc (list::erase): Increment loop counter. + (map::erase): Likewise. + Thu May 11 00:54:00 2000 Charles Wilson * cygwin.din: insure that regsub() is included in diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index c0cffc285..b63787ed4 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -83,7 +83,7 @@ list::add_record (mmap_record r) void list::erase (int i) { - while (i < nrecs-1) + for (; i < nrecs-1; i++) recs[i] = recs[i+1]; nrecs--; } @@ -137,7 +137,7 @@ map::add_list (list *l, int fd) void map::erase (int i) { - while (i < nlists-1) + for (; i < nlists-1; i++) lists[i] = lists[i+1]; nlists--; }