Let ErrnoMaintainer restore errno unconditionally.

* we never want to let ICU calls change the errno at all, so we always
  restore it to the value it had before entering ICU (not just if it
  was 0)
This commit is contained in:
Oliver Tappe 2011-11-24 23:27:59 +01:00
parent 6fabf01910
commit 1f84898190
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ public:
~ErrnoMaintainer()
{
if (errno != 0 && fErrnoUponEntry == 0)
errno = 0;
errno = fErrnoUponEntry;
}
private:
int fErrnoUponEntry;
};