memset a buffer to 0, to avoid Solaris UMR diagnostics.
git-svn-id: svn://10.0.0.236/trunk@26510 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
extern "C" int statvfs(const char *, struct statvfs *);
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
|
||||
// Canonify, make absolute, and check whether directories exist
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -69,7 +69,11 @@ void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
|
||||
}
|
||||
char buffer[MAXPATHLEN];
|
||||
errno = 0;
|
||||
#if defined(SOLARIS)
|
||||
memset(buffer, '\0', sizeof(buffer)); // realpath reads it all, initialized or not.
|
||||
#else
|
||||
*buffer = '\0';
|
||||
#endif
|
||||
char* canonicalPath = realpath((const char*)ioPath, buffer);
|
||||
if (!canonicalPath)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
extern "C" int statvfs(const char *, struct statvfs *);
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------
|
||||
void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
|
||||
// Canonify, make absolute, and check whether directories exist
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -69,7 +69,11 @@ void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
|
||||
}
|
||||
char buffer[MAXPATHLEN];
|
||||
errno = 0;
|
||||
#if defined(SOLARIS)
|
||||
memset(buffer, '\0', sizeof(buffer)); // realpath reads it all, initialized or not.
|
||||
#else
|
||||
*buffer = '\0';
|
||||
#endif
|
||||
char* canonicalPath = realpath((const char*)ioPath, buffer);
|
||||
if (!canonicalPath)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user