From 73102f5002272e82b083fa912068a3777f3e0f2e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Jan 2005 11:10:54 +0000 Subject: [PATCH] Update. 2005-01-10 Ulrich Drepper * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and recognition of last entry. --- ChangeLog | 5 +++++ sysdeps/generic/dl-tls.c | 9 ++++++--- time/strptime_l.c | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f124f1..b1295b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-10 Ulrich Drepper + + * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and + recognition of last entry. + 2005-01-09 Ulrich Drepper * elf/dl-runtime.c: Inlcude . diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c index 10b7f2c..099742c 100644 --- a/sysdeps/generic/dl-tls.c +++ b/sysdeps/generic/dl-tls.c @@ -67,7 +67,10 @@ _dl_next_tls_modid (void) /* Note that this branch will never be executed during program start since there are no gaps at that time. Therefore it does not matter that the dl_tls_dtv_slotinfo is not allocated - yet when the function is called for the first times. */ + yet when the function is called for the first times. + + NB: the offset +1 is due to the fact that DTV[0] is used + for something else. */ result = GL(dl_tls_static_nelem) + 1; /* If the following would not be true we mustn't have assumed there is a gap. */ @@ -90,11 +93,11 @@ _dl_next_tls_modid (void) } while ((runp = runp->next) != NULL); - if (result >= GL(dl_tls_max_dtv_idx)) + if (result > GL(dl_tls_max_dtv_idx)) { /* The new index must indeed be exactly one higher than the previous high. */ - assert (result == GL(dl_tls_max_dtv_idx)); + assert (result == GL(dl_tls_max_dtv_idx) + 1); /* There is no gap anymore. */ GL(dl_tls_dtv_gaps) = false; diff --git a/time/strptime_l.c b/time/strptime_l.c index 7deaef8..01c4f82 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -544,8 +544,8 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) is_pm = 1; else return NULL; - break; } + break; case 'r': #ifdef _NL_CURRENT if (*decided != raw) -- 2.7.4