mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Use nullptr (#816)
Changes applied by 'clang-modernize -use-nullptr [...]'
This commit is contained in:
+4
-4
@@ -648,7 +648,7 @@ int CExecSock::popen2(int & iReadFD, int & iWriteFD, const CString & sCommand) {
|
||||
"sh",
|
||||
"-c",
|
||||
sCommand.c_str(),
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
execvp("sh", (char * const *) pArgv);
|
||||
// if execvp returns, there was an error
|
||||
@@ -668,9 +668,9 @@ int CExecSock::popen2(int & iReadFD, int & iWriteFD, const CString & sCommand) {
|
||||
void CExecSock::close2(int iPid, int iReadFD, int iWriteFD) {
|
||||
close(iReadFD);
|
||||
close(iWriteFD);
|
||||
time_t iNow = time(NULL);
|
||||
while (waitpid(iPid, NULL, WNOHANG) == 0) {
|
||||
if ((time(NULL) - iNow) > 5)
|
||||
time_t iNow = time(nullptr);
|
||||
while (waitpid(iPid, nullptr, WNOHANG) == 0) {
|
||||
if ((time(nullptr) - iNow) > 5)
|
||||
break; // giveup
|
||||
usleep(100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user