Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0bc291e

Browse files
committed
Fix thinko (revealed by gcc warning).
1 parent7739cde commit0bc291e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
*$Id: pqcomm.c,v 1.120 2001/08/0710:44:15 petere Exp $
32+
*$Id: pqcomm.c,v 1.121 2001/08/0715:55:16 tgl Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -706,9 +706,13 @@ pq_eof(void)
706706

707707
res=recv(MyProcPort->sock,&x,1,MSG_PEEK);
708708

709-
if (res==-1)
709+
if (res<0)
710+
{
711+
/* don't try to elog here... */
710712
fprintf(stderr,"pq_eof: recv() failed: %s\n",strerror(errno));
711-
elseif (res==0)
713+
returnEOF;
714+
}
715+
if (res==0)
712716
returnEOF;
713717
else
714718
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp