Skip to content

Commit 8794bf1

Browse files
author
Michael Meskes
committed
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.
1 parent d809fd0 commit 8794bf1

File tree

1 file changed

+4
-4
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+4
-4
lines changed

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
575575
if (nres == NULL)
576576
{
577577
ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
578-
lineno, pval ? pval : "", errno);
578+
lineno, pval, errno);
579579

580580
if (INFORMIX_MODE(compat))
581581
{
@@ -634,7 +634,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
634634
if (ires == NULL)
635635
{
636636
ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
637-
lineno, pval ? pval : "", errno);
637+
lineno, pval, errno);
638638

639639
if (INFORMIX_MODE(compat))
640640
{
@@ -688,7 +688,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
688688
if (errno != 0)
689689
{
690690
ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
691-
lineno, pval ? pval : "", errno);
691+
lineno, pval, errno);
692692

693693
if (INFORMIX_MODE(compat))
694694
{
@@ -736,7 +736,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
736736
if (errno != 0)
737737
{
738738
ecpg_log("ecpg_get_data on line %d: RESULT %s; errno %d\n",
739-
lineno, pval ? pval : "", errno);
739+
lineno, pval, errno);
740740

741741
if (INFORMIX_MODE(compat))
742742
{

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