summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2011-04-12 07:59:00 -0700
committerThorsten Behrens <tbehrens@novell.com>2011-04-14 12:27:54 +0200
commita321df520200bbe8fc1c6c1e3974f53baa652c73 (patch)
treec6fabd504736ccb881186572e5e3d2126969f9e9
parent702be0bff5fb9ebbd3367ba72d472677e1b7f6eb (diff)
No need to check out execv return value.
If we ever return from execv, it is an error and the code already handle that. This fixes a dead assignment warning under CLang++.
-rw-r--r--sal/osl/unx/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index b41301c9e..7d65b5499 100644
--- a/sal/osl/unx/process.c
+++ b/sal/osl/unx/process.c
@@ -544,8 +544,9 @@ static void ChildStatusProc(void *pData)
if (stdError[1] != -1) close( stdError[1] );
}
- pid=execv(data.m_pszArgs[0], (sal_Char **)data.m_pszArgs);
-
+ // No need to check the return value of execv. If we return from
+ // it, an error has occurred.
+ execv(data.m_pszArgs[0], (sal_Char **)data.m_pszArgs);
}
OSL_TRACE("Failed to exec, errno=%d (%s)\n", errno, strerror(errno));