File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -115,23 +115,22 @@ pathman_cache_search_relid(HTAB *cache_table,
115115 HASHACTION action ,
116116 bool * found )
117117{
118- switch (action )
119- {
120- case HASH_FIND :
121- case HASH_REMOVE :
122- case HASH_ENTER :
123- if (!cache_table )
118+ /* Table is NULL, take some actions */
119+ if (cache_table == NULL )
120+ switch (action )
121+ {
122+ case HASH_FIND :
123+ case HASH_ENTER :
124+ case HASH_REMOVE :
124125 elog (ERROR , "pg_pathman is not initialized yet" );
125- break ;
126-
127- /* Something strange has just happened */
128- default :
129- elog (ERROR , "unexpected action in function "
130- CppAsString (pathman_cache_search_relid ));
131- break ;
132- }
126+ break ;
133127
134- AssertArg (cache_table );
128+ /* Something strange has just happened */
129+ default :
130+ elog (ERROR , "unexpected action in function "
131+ CppAsString (pathman_cache_search_relid ));
132+ break ;
133+ }
135134
136135 /* Everything is fine */
137136 return hash_search (cache_table , (const void * ) & relid , action , found );
You can’t perform that action at this time.
0 commit comments