mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Clean up uninitialized-variable warning from egcs.
(Curious that gcc doesn't complain about this code...).
This commit is contained in:
parent
3257b0e592
commit
ca08ce28e8
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.180 1999/05/26 20:08:06 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.181 1999/05/30 15:32:45 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -3118,7 +3118,7 @@ handleCopyIn(PGconn *conn, const bool mustprompt, FILE *copystream)
|
|||||||
char copybuf[COPYBUFSIZ];
|
char copybuf[COPYBUFSIZ];
|
||||||
char *s;
|
char *s;
|
||||||
int buflen;
|
int buflen;
|
||||||
int c;
|
int c = 0;
|
||||||
|
|
||||||
if (mustprompt)
|
if (mustprompt)
|
||||||
{
|
{
|
||||||
@ -3138,18 +3138,23 @@ handleCopyIn(PGconn *conn, const bool mustprompt, FILE *copystream)
|
|||||||
while (!linedone)
|
while (!linedone)
|
||||||
{ /* for each buffer ... */
|
{ /* for each buffer ... */
|
||||||
s = copybuf;
|
s = copybuf;
|
||||||
buflen = COPYBUFSIZ;
|
for (buflen = COPYBUFSIZ; buflen > 1; buflen--)
|
||||||
for (; buflen > 1 &&
|
{
|
||||||
!(linedone = (c = getc(copystream)) == '\n' || c == EOF);
|
c = getc(copystream);
|
||||||
--buflen)
|
if (c == '\n' || c == EOF)
|
||||||
|
{
|
||||||
|
linedone = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
*s++ = c;
|
*s++ = c;
|
||||||
|
}
|
||||||
|
*s = '\0';
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
{
|
{
|
||||||
PQputline(conn, "\\.");
|
PQputline(conn, "\\.");
|
||||||
copydone = true;
|
copydone = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*s = '\0';
|
|
||||||
PQputline(conn, copybuf);
|
PQputline(conn, copybuf);
|
||||||
if (firstload)
|
if (firstload)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user