Description
May be a false positive - should be investigated.
________________________________________________________________________________________________________
-
-
- CID 1213887: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
/src/slave/containerizer/mesos_containerizer.cpp: 416 in mesos::internal::slave::execute(const mesos::CommandInfo &, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Option<std::basic_string<char, std::char_traits<char>, std::allocator<char>>> &, const std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> &, bool, int, int, const std::list<Option<mesos::CommandInfo>, std::allocator<Option<mesos::CommandInfo>>> &)()
410 if (chown.isError()) { 411 ABORT("Failed to chown work directory"); 412 }413 }
{ 417 ABORT("Failed to chdir into work directory"); 418 }
414
415 // Enter working directory.
>>> CID 1213887: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
>>> "chdir(directory) < 0" is always false regardless of the values of its operands. This occurs as the logical operand of if.
416 if (os::chdir(directory) < 0)419
420 // Redirect output to files in working dir if required. We append because
421 // others (e.g., mesos-fetcher) may have already logged to the files.
- CID 1213887: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
-