8335610: DiagnosticFramework: CmdLine::is_executable() correction

Reviewed-by: dholmes, jsjolen
This commit is contained in:
Kevin Walls 2024-07-30 10:44:31 +00:00
parent 7ac531181c
commit 0325ab8d23

View File

@ -67,7 +67,7 @@ public:
const char* cmd_addr() const { return _cmd; }
size_t cmd_len() const { return _cmd_len; }
bool is_empty() const { return _cmd_len == 0; }
bool is_executable() const { return is_empty() || _cmd[0] != '#'; }
bool is_executable() const { return !is_empty() && _cmd[0] != '#'; }
bool is_stop() const { return !is_empty() && strncmp("stop", _cmd, _cmd_len) == 0; }
};