diff options
author | Michael Meskes <meskes@postgresql.org> | 2015-02-25 11:46:15 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2015-02-25 11:50:28 +0100 |
commit | 8794bf1ca164e1be1554197b46c9ffc62d162fb8 (patch) | |
tree | efdb20bcfaba4099b9288518ca8b8225e65871c3 /src | |
parent | d809fd0008a2e26de463f47b7aba0365264078f3 (diff) | |
download | postgresql-8794bf1ca164e1be1554197b46c9ffc62d162fb8.tar.gz postgresql-8794bf1ca164e1be1554197b46c9ffc62d162fb8.zip |
Remove null-pointer checks that are not needed.
If a pointer is guaranteed to carry information there is no need to check
for NULL again. Patch by Michael Paquier.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 2d0c1180a3c..2dcb9153da5 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -575,7 +575,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (nres == NULL) { ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n", - lineno, pval ? pval : "", errno); + lineno, pval, errno); if (INFORMIX_MODE(compat)) { @@ -634,7 +634,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (ires == NULL) { ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n", - lineno, pval ? pval : "", errno); + lineno, pval, errno); if (INFORMIX_MODE(compat)) { @@ -688,7 +688,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (errno != 0) { ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n", - lineno, pval ? pval : "", errno); + lineno, pval, errno); if (INFORMIX_MODE(compat)) { @@ -736,7 +736,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, if (errno != 0) { ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n", - lineno, pval ? pval : "", errno); + lineno, pval, errno); if (INFORMIX_MODE(compat)) { |