Skip to content

Commit a4566a7

Browse files
committed
Clean up gcc warning, fix inappropriate choice of configuration symbol.
1 parent 3261612 commit a4566a7

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
* $Id: pqcomm.c,v 1.104 2000/10/03 03:11:14 momjian Exp $
32+
* $Id: pqcomm.c,v 1.105 2000/10/05 20:18:33 tgl Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -172,12 +172,10 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
172172
SockAddr saddr;
173173
int fd,
174174
err;
175-
size_t len;
175+
size_t len = 0;
176176
int one = 1;
177-
178177
#ifdef HAVE_FCNTL_SETLK
179178
int lock_fd;
180-
181179
#endif
182180

183181
Assert(family == AF_INET || family == AF_UNIX);
@@ -209,11 +207,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
209207
MemSet((char *) &saddr, 0, sizeof(saddr));
210208
saddr.sa.sa_family = family;
211209

212-
/* I know this isn't a good way of testing, but until we have a
213-
* define for this it'll do!
214-
* we have Unix sockets...
215-
*/
216-
#ifdef HAVE_SYS_UN_H
210+
#ifdef HAVE_UNIX_SOCKETS
217211
if (family == AF_UNIX)
218212
{
219213
len = UNIXSOCK_PATH(saddr.un, portName);
@@ -236,7 +230,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
236230
}
237231
#endif /* HAVE_FCNTL_SETLK */
238232
}
239-
#endif /* HAVE_SYS_UN_H */
233+
#endif /* HAVE_UNIX_SOCKETS */
240234

241235
if (family == AF_INET)
242236
{
@@ -266,7 +260,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
266260
return STATUS_ERROR;
267261
}
268262

269-
#ifdef HAVE_SYS_UN_H /* yeah I know... */
263+
#ifdef HAVE_UNIX_SOCKETS
270264
if (family == AF_UNIX)
271265
{
272266
on_proc_exit(StreamDoUnlink, 0);
@@ -288,7 +282,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
288282
}
289283
#endif /* HAVE_FCNTL_SETLK */
290284
}
291-
#endif /* HAVE_SYS_UN_H */
285+
#endif /* HAVE_UNIX_SOCKETS */
292286

293287
listen(fd, SOMAXCONN);
294288

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