Skip to content

Commit ab95102

Browse files
CherkashinSergeyza-arthur
authored andcommitted
Fix gcc warning in variable_exists()
1 parent 21df5c3 commit ab95102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pg_variables.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ variable_exists(PG_FUNCTION_ARGS)
801801
text *package_name;
802802
text *var_name;
803803
Package *package;
804-
Variable *variable;
804+
Variable *variable = NULL;
805805
char key[NAMEDATALEN];
806806
bool found = false;
807807

@@ -831,7 +831,7 @@ variable_exists(PG_FUNCTION_ARGS)
831831
PG_FREE_IF_COPY(package_name, 0);
832832
PG_FREE_IF_COPY(var_name, 1);
833833

834-
PG_RETURN_BOOL(found ? GetActualState(variable)->is_valid : found);
834+
PG_RETURN_BOOL(variable ? GetActualState(variable)->is_valid : false);
835835
}
836836

837837
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy