mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
This commit is contained in:
@ -16,6 +16,9 @@
|
||||
#ifdef HAVE_ICONV_H
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "dbf.h"
|
||||
@ -673,7 +676,7 @@ main(int argc, char **argv)
|
||||
char *query;
|
||||
dbhead *dbh;
|
||||
|
||||
while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != EOF)
|
||||
while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != -1)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user