mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Fixed previous commit
Ooops, it should actually check the return value, not just ignore it...
This commit is contained in:
parent
9fd168934e
commit
2261ed4b79
5
src/lib/3rdparty/processinfo.cpp
vendored
5
src/lib/3rdparty/processinfo.cpp
vendored
|
@ -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
|
||||
if (fd_CmdLineFile) {
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user