diff options
author | sb <sb@openoffice.org> | 2009-12-10 11:32:26 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-12-10 11:32:26 +0100 |
commit | 4a96552f4966f204a15287d3c1a9340012792661 (patch) | |
tree | 74acd383af439aa81b21f7c801ff4f93c1afe548 /sal | |
parent | 0ba84eeda83b5241619a7c2e63f257db08629bad (diff) |
sb116: #i106074# moved variable declarations to beginning of C blocks, for non-C99 compilers
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 234232b1f0ef..e3f78ff2f2b4 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -467,6 +467,9 @@ static void ChildStatusProc(void *pData) if ( (status == 0) && ((pid = fork()) == 0) ) { /* Child */ + int chstatus = 0; + sal_Int32 nWrote; + if (channel[0] != -1) close(channel[0]); if ((data.m_uid != (uid_t)-1) && ((data.m_uid != getuid()) || (data.m_gid != getgid()))) @@ -482,7 +485,6 @@ static void ChildStatusProc(void *pData) #endif } - int chstatus = 0; if (data.m_pszDir) chstatus = chdir(data.m_pszDir); @@ -534,7 +536,7 @@ static void ChildStatusProc(void *pData) OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]); /* if we reach here, something went wrong */ - sal_Int32 nWrote = write(channel[1], &errno, sizeof(errno)); + nWrote = write(channel[1], &errno, sizeof(errno)); if (nWrote != sizeof(errno)) OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno)); |