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.
  • Loading branch information
esabol committed Nov 12, 2023
1 parent d780729 commit 86ad810
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libtest/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,9 @@ bool Server::init(const char *argv[])
{
if (argv)
{
for (const char **ptr= argv; *ptr ; ++ptr)
for (const char **ptr= argv; ptr && *ptr ; ++ptr)
{
if (ptr)
{
add_option(*ptr);
}
add_option(*ptr);
}
}

Expand Down

0 comments on commit 86ad810

Please sign in to comment.