From a27ddb1c6863497f2cf481cb5d5dfbd7ede66c84 Mon Sep 17 00:00:00 2001 From: Aron Podrigal Date: Tue, 30 Jan 2024 06:55:14 -0600 Subject: [PATCH] Refactor error assignment in mod_pgsql.c --- src/mod/databases/mod_pgsql/mod_pgsql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/databases/mod_pgsql/mod_pgsql.c b/src/mod/databases/mod_pgsql/mod_pgsql.c index 95e0a07843..45ded4898f 100644 --- a/src/mod/databases/mod_pgsql/mod_pgsql.c +++ b/src/mod/databases/mod_pgsql/mod_pgsql.c @@ -116,9 +116,9 @@ void pgsql_handle_set_error_if_not_set(switch_pgsql_handle_t *handle, char **err if (zstr(err_str)) { switch_safe_free(err_str); err_str = strdup((char *)"SQL ERROR!"); - } else { - *err = err_str; } + + *err = err_str; } }