Author: mturk Date: Tue Apr 14 11:12:09 2009 New Revision: 764738 URL: http://svn.apache.org/viewvc?rev=764738&view=rev Log: Always use clear error buffer
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/error.c Modified: commons/sandbox/runtime/trunk/src/main/native/shared/error.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/error.c?rev=764738&r1=764737&r2=764738&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/shared/error.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/shared/error.c Tue Apr 14 11:12:09 2009 @@ -382,14 +382,15 @@ static char *native_strerror(int statcode, char *buf, acr_size_t bufsize) { - const char *msg; #ifdef _GNU_SOURCE + const char *msg; buf[0] = '\0'; msg = strerror_r(statcode, buf, bufsize); if (buf[0] == '\0') { /* libc didn't use our buffer */ return stuffbuffer(buf, bufsize, msg); } #else + buf[0] = '\0'; if (!strerror_r(statcode, buf, bufsize)) { return buf; }