1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Fixed previous commit

Ooops, it should actually check the return value, not just ignore it...
This commit is contained in:
nowrep 2014-02-04 14:52:39 +01:00
parent 9fd168934e
commit 2261ed4b79

View File

@ -84,7 +84,10 @@ pid_t ProcessInfo::GetPIDbyName(const char* cchrptr_ProcessName) const
FILE* fd_CmdLineFile = fopen(chrarry_CommandLinePath, "rt") ; // open the file for reading text FILE* fd_CmdLineFile = fopen(chrarry_CommandLinePath, "rt") ; // open the file for reading text
if (fd_CmdLineFile) { if (fd_CmdLineFile) {
int r = fscanf(fd_CmdLineFile, "%20s", chrarry_NameOfProcess) ; // read from /proc/<NR>/cmdline int r = fscanf(fd_CmdLineFile, "%20s", chrarry_NameOfProcess) ; // read from /proc/<NR>/cmdline
Q_UNUSED(r)
if (r < 1) {
continue;
}
fclose(fd_CmdLineFile); // close the file prior to exiting the routine fclose(fd_CmdLineFile); // close the file prior to exiting the routine