From d3f1134dca21006db6c0a6ccb295e33dbd05ec43 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 14 Jun 2016 06:08:10 +0000 Subject: [PATCH] Fix syntax error in r272640. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272641 91177308-0d34-0410-b5e6-96231b3b80d8 --- src/system_error.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system_error.cpp b/src/system_error.cpp index d7115fc66..885afd18c 100644 --- a/src/system_error.cpp +++ b/src/system_error.cpp @@ -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;