]> granicus.if.org Git - postgresql/commitdiff
Fix bogus declaration of local variable.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 May 2012 04:30:32 +0000 (00:30 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 May 2012 04:30:32 +0000 (00:30 -0400)
rc should be an int here, not a pgsocket.  Fairly harmless as long as
pgsocket is an integer type, but nonetheless wrong.  Error introduced
in commit 87091cb1f1ed914e2ddca424fa28f94fdf8461d2.

src/backend/libpq/auth.c

index 187aea8f9905dc534e53ec615e4ea1848f354ab2..5853b068daa6715de84291955ba84ae657db2dec 100644 (file)
@@ -1600,9 +1600,9 @@ ident_inet(hbaPort *port)
        const SockAddr remote_addr = port->raddr;
        const SockAddr local_addr = port->laddr;
        char            ident_user[IDENT_USERNAME_MAX + 1];
-       pgsocket        sock_fd,                /* File descriptor for socket on which we talk
+       pgsocket        sock_fd;                /* File descriptor for socket on which we talk
                                                                 * to Ident */
-                               rc;                             /* Return code from a locally called function */
+       int                     rc;                             /* Return code from a locally called function */
        bool            ident_return;
        char            remote_addr_s[NI_MAXHOST];
        char            remote_port[NI_MAXSERV];