Skip to content

Commit

Permalink
Fixed redundant null check due to previous dereference found in CodeQ…
Browse files Browse the repository at this point in the history
…L scan. (#380)
  • Loading branch information
esabol authored Nov 18, 2023
1 parent d780729 commit a00fb0e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libtest/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,9 @@ bool Server::wait_for_pidfile() const

bool Server::init(const char *argv[])
{
if (argv)
for (const char **ptr= argv; ptr && *ptr ; ++ptr)
{
for (const char **ptr= argv; *ptr ; ++ptr)
{
if (ptr)
{
add_option(*ptr);
}
}
add_option(*ptr);
}

return build();
Expand Down

0 comments on commit a00fb0e

Please sign in to comment.