Skip to content

Commit 87675fa

Browse files
committed
pgindent copy.c. Patch wasn't in proper format.
1 parent 0cd8cb1 commit 87675fa

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

src/backend/commands/copy.c

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.147 2002/02/24 02:32:26 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.148 2002/02/24 02:33:33 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -326,20 +326,22 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
326326
}
327327
else
328328
{
329-
struct stat st;
329+
struct stat st;
330+
330331
fp = AllocateFile(filename, PG_BINARY_R);
331-
332-
if (fp == NULL)
332+
333+
if (fp == NULL)
333334
elog(ERROR, "COPY command, running in backend with "
334335
"effective uid %d, could not open file '%s' for "
335336
"reading. Errno = %s (%d).",
336337
(int) geteuid(), filename, strerror(errno), errno);
337-
338-
fstat(fileno(fp),&st);
339-
if( S_ISDIR(st.st_mode) ){
340-
FreeFile(fp);
341-
elog(ERROR,"COPY: %s is a directory.",filename);
342-
}
338+
339+
fstat(fileno(fp), &st);
340+
if (S_ISDIR(st.st_mode))
341+
{
342+
FreeFile(fp);
343+
elog(ERROR, "COPY: %s is a directory.", filename);
344+
}
343345
}
344346
CopyFrom(rel, binary, oids, fp, delim, null_print);
345347
}
@@ -368,7 +370,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
368370
else
369371
{
370372
mode_t oumask; /* Pre-existing umask value */
371-
struct stat st;
373+
struct stat st;
372374

373375
/*
374376
* Prevent write to relative path ... too easy to shoot
@@ -387,11 +389,12 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
387389
"effective uid %d, could not open file '%s' for "
388390
"writing. Errno = %s (%d).",
389391
(int) geteuid(), filename, strerror(errno), errno);
390-
fstat(fileno(fp),&st);
391-
if( S_ISDIR(st.st_mode) ){
392-
FreeFile(fp);
393-
elog(ERROR,"COPY: %s is a directory.",filename);
394-
}
392+
fstat(fileno(fp), &st);
393+
if (S_ISDIR(st.st_mode))
394+
{
395+
FreeFile(fp);
396+
elog(ERROR, "COPY: %s is a directory.", filename);
397+
}
395398
}
396399
CopyTo(rel, binary, oids, fp, delim, null_print);
397400
}
@@ -1097,25 +1100,25 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_
10971100
if (ISOCTAL(c))
10981101
{
10991102
val = (val << 3) + OCTVALUE(c);
1100-
CopyDonePeek(fp, c, true /*pick up*/);
1103+
CopyDonePeek(fp, c, true /* pick up */ );
11011104
c = CopyPeekChar(fp);
11021105
if (ISOCTAL(c))
11031106
{
11041107
val = (val << 3) + OCTVALUE(c);
1105-
CopyDonePeek(fp, c, true /*pick up*/);
1108+
CopyDonePeek(fp, c, true /* pick up */ );
11061109
}
11071110
else
11081111
{
11091112
if (c == EOF)
11101113
goto endOfFile;
1111-
CopyDonePeek(fp, c, false /*put back*/);
1114+
CopyDonePeek(fp, c, false /* put back */ );
11121115
}
11131116
}
11141117
else
11151118
{
11161119
if (c == EOF)
11171120
goto endOfFile;
1118-
CopyDonePeek(fp, c, false /*put back*/);
1121+
CopyDonePeek(fp, c, false /* put back */ );
11191122
}
11201123
c = val & 0377;
11211124
}

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