Fix a bug in my previous change to this, which broke the build on sparcs.

llvm-svn: 20184
This commit is contained in:
Chris Lattner 2005-02-14 21:42:10 +00:00
parent 43b14db4d9
commit 51c55602c9

View File

@ -77,7 +77,7 @@ inline void ThrowErrno(const std::string& prefix) {
// Copy the thread un-safe result of strerror into
// the buffer as fast as possible to minimize impact
// of collision of strerror in multiple threads.
if (Errno)
if (errno)
strncpy(buffer,strerror(errno),MAXPATHLEN-1);
buffer[MAXPATHLEN-1] = 0;
#else