summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/threadutil.cpp
authorerik <erik>2007-01-31 22:06:07 (UTC)
committer erik <erik>2007-01-31 22:06:07 (UTC)
commit9395cf2a65184e493714c699bb23b02ea31feef5 (patch) (unidiff)
treeea07c026298820559c13ad32e612d51048cee0a9 /noncore/multimedia/opieplayer2/threadutil.cpp
parent958e042c5a4d4e38fd1baae50b78a2febfd306ab (diff)
downloadopie-9395cf2a65184e493714c699bb23b02ea31feef5.zip
opie-9395cf2a65184e493714c699bb23b02ea31feef5.tar.gz
opie-9395cf2a65184e493714c699bb23b02ea31feef5.tar.bz2
I expanded my audit to include any app I could get to compile in i386.
In that expansion a whole new crop of unchecked returns has sprung up. This commit fixes those weeds or should I say potential bugs.
Diffstat (limited to 'noncore/multimedia/opieplayer2/threadutil.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index b5cac61..5fc8a0b 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -224,30 +224,35 @@ bool Thread::wait()
224 224
225bool Thread::isRunning() const 225bool Thread::isRunning() const
226{ 226{
227 AutoLock lock( d->guard ); 227 AutoLock lock( d->guard );
228 return d->isRunning; 228 return d->isRunning;
229} 229}
230 230
231void Thread::exit() 231void Thread::exit()
232{ 232{
233 pthread_exit( 0 ); 233 pthread_exit( 0 );
234} 234}
235 235
236OnewayNotifier::OnewayNotifier() 236OnewayNotifier::OnewayNotifier() :
237 m_readFd(-1),
238 m_writeFd(-1)
237{ 239{
238 int fds[ 2 ]; 240 int fds[ 2 ] = { -1, -1 };
239 pipe( fds ); 241 if (pipe( fds ) == 0) {
240 m_readFd = fds[ 0 ]; 242 m_readFd = fds[ 0 ];
241 m_writeFd = fds[ 1 ]; 243 m_writeFd = fds[ 1 ];
244 } else {
245 owarn << "Call to pipe() failed" << oendl;
246 }
242 247
243 m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read ); 248 m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read );
244 connect( m_notifier, SIGNAL( activated(int) ), 249 connect( m_notifier, SIGNAL( activated(int) ),
245 this, SLOT( wakeUp() ) ); 250 this, SLOT( wakeUp() ) );
246} 251}
247 252
248OnewayNotifier::~OnewayNotifier() 253OnewayNotifier::~OnewayNotifier()
249{ 254{
250 delete m_notifier; 255 delete m_notifier;
251 256
252 ::close( m_readFd ); 257 ::close( m_readFd );
253 ::close( m_writeFd ); 258 ::close( m_writeFd );