Fix syntax error in r272640.

llvm-svn: 272641
This commit is contained in:
Eric Fiselier 2016-06-14 06:08:10 +00:00
parent 79e0574db0
commit 61df7909ab
1 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,8 @@ string do_strerror_r(int ev) {
string do_strerror_r(int ev) {
char buffer[strerror_buff_size];
const int old_errno = errno;
if ((int ret = ::strerror_r(ev, buffer, strerror_buff_size)) != 0) {
int ret;
if ((ret = ::strerror_r(ev, buffer, strerror_buff_size)) != 0) {
// If `ret == -1` then the error is specified using `errno`, otherwise
// `ret` represents the error.
const int new_errno = ret == -1 ? errno : ret;