mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-06 07:33:08 +00:00
[gdb] Check strpbrk against nullptr
In noticed two occurrences of "if (strpbrk (...))". Fix this style issue by checking against nullptr.
This commit is contained in:
@@ -697,7 +697,7 @@ go32_nat_target::create_inferior (const char *exec_file,
|
||||
"not enough memory.\n"));
|
||||
|
||||
/* Parse the command line and create redirections. */
|
||||
if (strpbrk (args, "<>"))
|
||||
if (strpbrk (args, "<>") != nullptr)
|
||||
{
|
||||
if (redir_cmdline_parse (args, &child_cmd) == 0)
|
||||
args = child_cmd.command;
|
||||
|
||||
@@ -59,7 +59,7 @@ escape_characters (const char *arg, const char *special)
|
||||
#ifdef __MINGW32__
|
||||
bool quoted = false;
|
||||
|
||||
if (strpbrk (arg, special))
|
||||
if (strpbrk (arg, special) != nullptr)
|
||||
{
|
||||
quoted = true;
|
||||
result += quote;
|
||||
|
||||
Reference in New Issue
Block a user