Changes: Some coverity tool defects are fixed

RevBy: TrustMe
pull/1/head
Alexey Shilov 15 years ago
parent 9c27048092
commit 8e20669c79

2
debian/changelog vendored

@ -1,6 +1,6 @@
applauncherd (0.28.0) unstable; urgency=low applauncherd (0.28.0) unstable; urgency=low
* * Changes: Some coverity tool defects are fixed
-- Olli Leppanen <olli.leppanen@nokia.com> Thu, 14 Apr 2011 13:49:24 +0300 -- Olli Leppanen <olli.leppanen@nokia.com> Thu, 14 Apr 2011 13:49:24 +0300

@ -103,6 +103,7 @@ static int invokeLauncherLib(int argc, char ** argv)
if ((error = dlerror()) != NULL) if ((error = dlerror()) != NULL)
{ {
fprintf(stderr, "%s\n", error); fprintf(stderr, "%s\n", error);
dlclose(handle);
return 0; return 0;
} }

@ -43,7 +43,14 @@ Connection::Connection(int socketFd, bool testMode) :
m_argv(NULL), m_argv(NULL),
m_priority(0), m_priority(0),
m_delay(0), m_delay(0),
m_sendPid(false) m_sendPid(false),
#if defined (HAVE_CREDS)
m_credsValue(0),
m_credsType(0),
#endif
m_gid(0),
m_uid(0)
{ {
m_io[0] = -1; m_io[0] = -1;
m_io[1] = -1; m_io[1] = -1;
@ -248,7 +255,7 @@ uint32_t Connection::receiveMagic()
if ((magic & INVOKER_MSG_MASK) == INVOKER_MSG_MAGIC) if ((magic & INVOKER_MSG_MASK) == INVOKER_MSG_MAGIC)
{ {
if (!(magic & INVOKER_MSG_MAGIC_VERSION_MASK) == INVOKER_MSG_MAGIC_VERSION) if (!((magic & INVOKER_MSG_MAGIC_VERSION_MASK) == INVOKER_MSG_MAGIC_VERSION))
{ {
Logger::logError("Connection: receiving bad magic version (%08x)\n", magic); Logger::logError("Connection: receiving bad magic version (%08x)\n", magic);
return -1; return -1;

@ -164,8 +164,6 @@ private:
uint32_t m_priority; uint32_t m_priority;
uint32_t m_delay; uint32_t m_delay;
bool m_sendPid; bool m_sendPid;
gid_t m_gid;
uid_t m_uid;
#if defined (HAVE_CREDS) #if defined (HAVE_CREDS)
static const char * m_credsStr; static const char * m_credsStr;
@ -173,6 +171,10 @@ private:
creds_type_t m_credsType; creds_type_t m_credsType;
#endif #endif
gid_t m_gid;
uid_t m_uid;
#ifdef UNIT_TEST #ifdef UNIT_TEST
friend class Ut_Connection; friend class Ut_Connection;
#endif #endif

Loading…
Cancel
Save