1010 *
1111 *
1212 * IDENTIFICATION
13- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.169 2008/10/23 13:31:10 mha Exp $
13+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.170 2008/10/24 12:48:31 mha Exp $
1414 *
1515 *-------------------------------------------------------------------------
1616 */
@@ -581,7 +581,7 @@ check_db(const char *dbname, const char *role, char *param_str)
581581optname, validmethods), \
582582 errcontext("line %d of configuration file \"%s\"", \
583583line_num, HbaFileName))); \
584- goto hba_other_error ; \
584+ return false ; \
585585} while (0);
586586
587587#define REQUIRE_AUTH_OPTION (methodval ,optname ,validmethods ) do {\
@@ -597,7 +597,7 @@ check_db(const char *dbname, const char *role, char *param_str)
597597authname, argname), \
598598 errcontext("line %d of configuration file \"%s\"", \
599599line_num, HbaFileName))); \
600- goto hba_other_error ; \
600+ return false ; \
601601} \
602602} while (0);
603603
@@ -704,7 +704,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
704704* cidr_slash = '/' ;
705705if (gai_result )
706706pg_freeaddrinfo_all (hints .ai_family ,gai_result );
707- goto hba_other_error ;
707+ return false ;
708708}
709709
710710if (cidr_slash )
@@ -739,7 +739,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
739739line_num ,HbaFileName )));
740740if (gai_result )
741741pg_freeaddrinfo_all (hints .ai_family ,gai_result );
742- goto hba_other_error ;
742+ return false ;
743743}
744744
745745memcpy (& parsedline -> mask ,gai_result -> ai_addr ,gai_result -> ai_addrlen );
@@ -751,7 +751,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
751751(errcode (ERRCODE_CONFIG_FILE_ERROR ),
752752errmsg ("IP address and mask do not match in file \"%s\" line %d" ,
753753HbaFileName ,line_num )));
754- goto hba_other_error ;
754+ return false ;
755755}
756756}
757757}/* != ctLocal */
@@ -813,7 +813,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
813813token ),
814814errcontext ("line %d of configuration file \"%s\"" ,
815815line_num ,HbaFileName )));
816- goto hba_other_error ;
816+ return false ;
817817}
818818
819819if (unsupauth )
@@ -824,7 +824,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
824824token ),
825825errcontext ("line %d of configuration file \"%s\"" ,
826826line_num ,HbaFileName )));
827- goto hba_other_error ;
827+ return false ;
828828}
829829
830830/* Invalid authentication combinations */
@@ -836,7 +836,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
836836errmsg ("krb5 authentication is not supported on local sockets" ),
837837errcontext ("line %d of configuration file \"%s\"" ,
838838line_num ,HbaFileName )));
839- goto hba_other_error ;
839+ return false ;
840840}
841841
842842/* Parse remaining arguments */
@@ -859,7 +859,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
859859errmsg ("authentication option not in name=value format: %s" ,token ),
860860errcontext ("line %d of configuration file \"%s\"" ,
861861line_num ,HbaFileName )));
862- goto hba_other_error ;
862+ return false ;
863863}
864864else
865865{
@@ -902,7 +902,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
902902errmsg ("invalid ldap port '%s'" ,c ),
903903errcontext ("line %d of configuration file \"%s\"" ,
904904line_num ,HbaFileName )));
905- goto hba_other_error ;
905+ return false ;
906906}
907907}
908908else if (strcmp (token ,"ldapprefix" )== 0 )
@@ -922,7 +922,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
922922errmsg ("unknown authentication option name '%s'" ,token ),
923923errcontext ("line %d of configuration file \"%s\"" ,
924924line_num ,HbaFileName )));
925- goto hba_other_error ;
925+ return false ;
926926}
927927}
928928}
@@ -953,8 +953,6 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
953953errcontext ("line %d of configuration file \"%s\"" ,
954954line_num ,HbaFileName )));
955955
956- /* Come here if suitable message already logged */
957- hba_other_error :
958956return false;
959957}
960958