Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix function return type confusion
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Dec 2021 05:51:48 +0000 (00:51 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 13 Dec 2021 05:51:48 +0000 (00:51 -0500)
When parse_hba_line's return type was changed from bool to a pointer,
the MANDATORY_AUTH_ARG macro wasn't adjusted.

This back-patches commit c74d586d2 into out-of-support branches,
pursuant to newly-established project policy.  The point is to
suppress scary-looking warnings so that people building these
branches needn't expend brain cells verifying that it's safe
to ignore the warnings.

Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com

src/backend/libpq/hba.c

index 49b2ea94db43da4650b7058455e50f5e6a3c624b..07be4b7d93557030762655cd6ad8c791df6b58fa 100644 (file)
@@ -745,7 +745,7 @@ check_same_host_or_net(SockAddr *raddr, IPCompareMethod method)
                        authname, argname), \
                 errcontext("line %d of configuration file \"%s\"", \
                        line_num, HbaFileName))); \
-       return false; \
+       return NULL; \
    } \
 } while (0);