mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-27 13:13:20 -08:00
Use successful_exit() helper for testing system() return value
This commit is contained in:
2
util.cpp
2
util.cpp
@@ -145,7 +145,7 @@ int exec_command (const char* command, std::ostream& output)
|
||||
|
||||
bool successful_exit (int status)
|
||||
{
|
||||
return WIFEXITED(status) && WEXITSTATUS(status) == 0;
|
||||
return status != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0;
|
||||
}
|
||||
|
||||
void open_tempfile (std::fstream& file, std::ios_base::openmode mode)
|
||||
|
||||
Reference in New Issue
Block a user