Skip to content

Commit 7542f10

Browse files
committed
Improve psql comment coding.
1 parent d72f6c7 commit 7542f10

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/bin/psql/mainloop.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.54 2003/03/20 22:08:50 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.55 2003/03/21 03:28:29 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "mainloop.h"
@@ -281,15 +281,9 @@ MainLoop(FILE *source)
281281
/* in or end of extended comment? */
282282
else if (in_xcomment)
283283
{
284-
if (line[i] == '*' && line[i + thislen] == '/')
285-
{
286-
in_xcomment--;
287-
if (in_xcomment <= 0)
288-
{
289-
in_xcomment = 0;
284+
if (line[i] == '*' && line[i + thislen] == '/' &&
285+
!--in_xcomment)
290286
ADVANCE_1;
291-
}
292-
}
293287
}
294288

295289
/* start of quote? */

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