database/DBio.c: Redundant null check due to previous dereference

Fix code scanning alert no. 132: Redundant null check due to previous dereference (#39)

* Update DBio.c

* AI wanted to move guard 'pathptr != NULL' up to 1953, but it is assigned to guaranteed non-null in every assignment above and only incremented or dereferenced.

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Darryl Miles 2024-09-30 06:11:54 +01:00 committed by Tim Edwards
parent f976005d2d
commit 499ac84ac0
1 changed files with 1 additions and 1 deletions

View File

@ -2148,7 +2148,7 @@ badTransform:
/* default path but the new cell has a (different) path. */
/* The paths only match if pathptr is the CWD. */
else if ((pathptr != NULL) && (*pathptr != '\0'))
else if (*pathptr != '\0')
{
bool pathOK = FALSE;
char *cwddir = getenv("PWD");