Skip to content

Commit b6a40d8

Browse files
committed
Small pg_config.c cleanup.
1 parent 48187a1 commit b6a40d8

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/bin/pg_config/pg_config.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1919
*
20-
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.1 2004/08/01 13:54:05 momjian Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.2 2004/08/01 14:01:36 momjian Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -28,7 +28,7 @@
2828

2929
#define _(x) gettext((x))
3030

31-
char * progname;
31+
static char *progname;
3232

3333
static void
3434
help()
@@ -67,8 +67,6 @@ main (int argc, char ** argv)
6767

6868
progname = (char *)get_progname(argv[0]);
6969

70-
71-
7270
if (argc < 2)
7371
{
7472
fprintf(stderr,_("%s: argument required\n"),progname);
@@ -83,11 +81,9 @@ main (int argc, char ** argv)
8381
strcmp(argv[i],"--includedir-server") == 0 ||
8482
strcmp(argv[i],"--libdir") == 0 ||
8583
strcmp(argv[i],"--pkglibdir") == 0 ||
86-
strcmp(argv[i],"--configure") == 0
87-
)
84+
strcmp(argv[i],"--configure") == 0)
8885
{
8986
/* come back to these later */
90-
9187
continue;
9288
}
9389

@@ -114,23 +110,19 @@ main (int argc, char ** argv)
114110
exit(1);
115111
}
116112

117-
118-
119113
for (i=1; i < argc; i++)
120114
{
121115
if (strcmp(argv[i],"--configure") == 0)
122116
{
123117
/* the VAL_CONFIGURE macro must be defined by the Makefile */
124-
125118
printf("%s\n",VAL_CONFIGURE);
126119
continue;
127120
}
128121

129122
if (strcmp(argv[i],"--bindir") == 0)
130123
{
131124
/* assume we are located in the bindir */
132-
133-
char * lastsep;
125+
char *lastsep;
134126
strcpy(otherpath,mypath);
135127
lastsep = strrchr(otherpath,'/');
136128
if (lastsep)
@@ -146,8 +138,6 @@ main (int argc, char ** argv)
146138
get_pkglib_path(mypath,otherpath);
147139

148140
printf("%s\n",otherpath);
149-
150-
151141
}
152142

153143
return 0;

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