summaryrefslogtreecommitdiff
path: root/libopie2
authorerik <erik>2007-01-19 01:18:01 (UTC)
committer erik <erik>2007-01-19 01:18:01 (UTC)
commit32343107b30904806d02672955c57ed53d39fe79 (patch) (unidiff)
tree9114a0ea170e3adc807a2445b49360f1bfde9626 /libopie2
parentac0ce844e90a64247c0adb210e0a23021b011d57 (diff)
downloadopie-32343107b30904806d02672955c57ed53d39fe79.zip
opie-32343107b30904806d02672955c57ed53d39fe79.tar.gz
opie-32343107b30904806d02672955c57ed53d39fe79.tar.bz2
Every file in this commit has a change to check the return value of a call.
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oglobal.cpp2
-rw-r--r--libopie2/opiecore/oprocess.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp
index 706ac6c..b7d59fc 100644
--- a/libopie2/opiecore/oglobal.cpp
+++ b/libopie2/opiecore/oglobal.cpp
@@ -341,13 +341,13 @@ bool OGlobal::isDocumentFileName( const QString& file )
341 QList< FileSystem > fl = si.fileSystems(); 341 QList< FileSystem > fl = si.fileSystems();
342 FileSystem*fs; 342 FileSystem*fs;
343 for (fs = fl.first();fs!=0;fs=fl.next()) { 343 for (fs = fl.first();fs!=0;fs=fl.next()) {
344 if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) 344 if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator()))
345 return true; 345 return true;
346 } 346 }
347 if (file.startsWith(homeDirPath())+"/Documents/") return true; 347 if (file.startsWith(homeDirPath()+"/Documents/")) return true;
348 return false; 348 return false;
349} 349}
350 350
351QString OGlobal::tempDirPath() 351QString OGlobal::tempDirPath()
352{ 352{
353 static QString defstring="/tmp"; 353 static QString defstring="/tmp";
diff --git a/libopie2/opiecore/oprocess.cpp b/libopie2/opiecore/oprocess.cpp
index b3f9724..56f9883 100644
--- a/libopie2/opiecore/oprocess.cpp
+++ b/libopie2/opiecore/oprocess.cpp
@@ -925,13 +925,13 @@ int OProcess::processPID( const QString& process )
925 QStringList dirs = d.entryList( QDir::Dirs ); 925 QStringList dirs = d.entryList( QDir::Dirs );
926 QStringList::Iterator it; 926 QStringList::Iterator it;
927 for ( it = dirs.begin(); it != dirs.end(); ++it ) 927 for ( it = dirs.begin(); it != dirs.end(); ++it )
928 { 928 {
929 //qDebug( "next entry: %s", (const char*) *it ); 929 //qDebug( "next entry: %s", (const char*) *it );
930 QFile file( "/proc/"+*it+"/cmdline" ); 930 QFile file( "/proc/"+*it+"/cmdline" );
931 file.open( IO_ReadOnly ); 931 if ( !file.open( IO_ReadOnly ) ) continue;
932 if ( !file.isOpen() ) continue; 932 if ( !file.isOpen() ) continue;
933 QTextStream t( &file ); 933 QTextStream t( &file );
934 line = t.readLine(); 934 line = t.readLine();
935 //qDebug( "cmdline = %s", (const char*) line ); 935 //qDebug( "cmdline = %s", (const char*) line );
936 if ( line.contains( process ) ) break; //FIXME: That may find also other process, if the name is not long enough ;) 936 if ( line.contains( process ) ) break; //FIXME: That may find also other process, if the name is not long enough ;)
937 } 937 }