From 6f73bec9d6530830021e6a24f42b9aad84f9810b Mon Sep 17 00:00:00 2001 From: P Aswini Kumar Date: Wed, 25 Sep 2024 12:29:02 +0000 Subject: [PATCH] Remove null checks Signed-off-by: P Aswini Kumar --- contrib/babelfishpg_tsql/src/procedures.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/contrib/babelfishpg_tsql/src/procedures.c b/contrib/babelfishpg_tsql/src/procedures.c index 9e5d6f4600..7c570cd148 100644 --- a/contrib/babelfishpg_tsql/src/procedures.c +++ b/contrib/babelfishpg_tsql/src/procedures.c @@ -1707,13 +1707,9 @@ create_xp_qv_in_master_dbo_internal(PG_FUNCTION_ARGS) char *dbo_scm = get_dbo_schema_name("master"); - if (dbo_scm == NULL) - elog(ERROR, "Failed to retrieve dbo schema name"); - query = psprintf(tempq, dbo_scm); - if(dbo_scm) - pfree(dbo_scm); + pfree(dbo_scm); PG_TRY(); { @@ -1800,14 +1796,10 @@ create_xp_instance_regread_in_master_dbo_internal(PG_FUNCTION_ARGS) char *dbo_scm = get_dbo_schema_name("master"); - if (dbo_scm == NULL) - elog(ERROR, "Failed to retrieve dbo schema name"); - query = psprintf(tempq, dbo_scm); query2 = psprintf(tempq2, dbo_scm); - if(dbo_scm) - pfree(dbo_scm); + pfree(dbo_scm); PG_TRY(); { @@ -3383,8 +3375,7 @@ sp_babelfish_volatility(PG_FUNCTION_ARGS) pfree(logical_schema_name); } - if(guest_role_name) - pfree(guest_role_name); + pfree(guest_role_name); } else {