summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorBruce Momjian2012-06-10 19:20:04 +0000
committerBruce Momjian2012-06-10 19:20:04 +0000
commit927d61eeff78363ea3938c818d07e511ebaf75cf (patch)
tree2f0bcecf53327f76272a8ce690fa62505520fab9 /src/port
parent60801944fa105252b48ea5688d47dfc05c695042 (diff)
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
Diffstat (limited to 'src/port')
-rw-r--r--src/port/erand48.c2
-rw-r--r--src/port/fls.c18
-rw-r--r--src/port/getaddrinfo.c2
-rw-r--r--src/port/path.c2
-rw-r--r--src/port/win32setlocale.c38
5 files changed, 31 insertions, 31 deletions
diff --git a/src/port/erand48.c b/src/port/erand48.c
index 9d471197c35..524911edd12 100644
--- a/src/port/erand48.c
+++ b/src/port/erand48.c
@@ -5,7 +5,7 @@
* This file supplies pg_erand48(), pg_lrand48(), and pg_srand48(), which
* are just like erand48(), lrand48(), and srand48() except that we use
* our own implementation rather than the one provided by the operating
- * system. We used to test for an operating system version rather than
+ * system. We used to test for an operating system version rather than
* unconditionally using our own, but (1) some versions of Cygwin have a
* buggy erand48() that always returns zero and (2) as of 2011, glibc's
* erand48() is strangely coded to be almost-but-not-quite thread-safe,
diff --git a/src/port/fls.c b/src/port/fls.c
index 4a2d6737cf9..8be2c51ef3d 100644
--- a/src/port/fls.c
+++ b/src/port/fls.c
@@ -10,7 +10,7 @@
* src/port/fls.c
*
* This file was taken from FreeBSD to provide an implementation of fls()
- * for platforms that lack it. Note that the operating system's version may
+ * for platforms that lack it. Note that the operating system's version may
* be substantially more efficient than ours, since some platforms have an
* assembly instruction that does exactly this.
*
@@ -25,18 +25,18 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -54,11 +54,11 @@
int
fls(int mask)
{
- int bit;
+ int bit;
if (mask == 0)
return (0);
for (bit = 1; mask != 1; bit++)
- mask = (unsigned int)mask >> 1;
+ mask = (unsigned int) mask >> 1;
return (bit);
}
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index 579d8556480..c117012ec7e 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -328,7 +328,7 @@ gai_strerror(int errcode)
case EAI_MEMORY:
return "Not enough memory";
#endif
-#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME /* MSVC/WIN64 duplicate */
+#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME /* MSVC/WIN64 duplicate */
case EAI_NODATA:
return "No host data of that type was found";
#endif
diff --git a/src/port/path.c b/src/port/path.c
index be55e4af60d..738b5cc547c 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -212,7 +212,7 @@ join_path_components(char *ret_path,
}
if (*tail)
snprintf(ret_path + strlen(ret_path), MAXPGPATH - strlen(ret_path),
- /* only add slash if there is something already in head */
+ /* only add slash if there is something already in head */
"%s%s", head[0] ? "/" : "", tail);
}
diff --git a/src/port/win32setlocale.c b/src/port/win32setlocale.c
index f8b17623717..844891df537 100644
--- a/src/port/win32setlocale.c
+++ b/src/port/win32setlocale.c
@@ -27,12 +27,11 @@
struct locale_map
{
- const char *locale_name_part; /* string in locale name to replace */
- const char *replacement; /* string to replace it with */
+ const char *locale_name_part; /* string in locale name to replace */
+ const char *replacement; /* string to replace it with */
};
static const struct locale_map locale_map_list[] = {
-
/*
* "HKG" is listed here:
* http://msdn.microsoft.com/en-us/library/cdax410z%28v=vs.71%29.aspx
@@ -41,26 +40,26 @@ static const struct locale_map locale_map_list[] = {
* "ARE" is the ISO-3166 three-letter code for U.A.E. It is not on the
* above list, but seems to work anyway.
*/
- { "Hong Kong S.A.R.", "HKG" },
- { "U.A.E.", "ARE" },
+ {"Hong Kong S.A.R.", "HKG"},
+ {"U.A.E.", "ARE"},
/*
* The ISO-3166 country code for Macau S.A.R. is MAC, but Windows doesn't
- * seem to recognize that. And Macau isn't listed in the table of
- * accepted abbreviations linked above. Fortunately, "ZHM" seems to be
- * accepted as an alias for "Chinese (Traditional)_Macau S.A.R..950". I'm
- * not sure where "ZHM" comes from, must be some legacy naming scheme. But
- * hey, it works.
+ * seem to recognize that. And Macau isn't listed in the table of accepted
+ * abbreviations linked above. Fortunately, "ZHM" seems to be accepted as
+ * an alias for "Chinese (Traditional)_Macau S.A.R..950". I'm not sure
+ * where "ZHM" comes from, must be some legacy naming scheme. But hey, it
+ * works.
*
* Note that unlike HKG and ARE, ZHM is an alias for the *whole* locale
* name, not just the country part.
*
* Some versions of Windows spell it "Macau", others "Macao".
*/
- { "Chinese (Traditional)_Macau S.A.R..950", "ZHM" },
- { "Chinese_Macau S.A.R..950", "ZHM" },
- { "Chinese (Traditional)_Macao S.A.R..950", "ZHM" },
- { "Chinese_Macao S.A.R..950", "ZHM" }
+ {"Chinese (Traditional)_Macau S.A.R..950", "ZHM"},
+ {"Chinese_Macau S.A.R..950", "ZHM"},
+ {"Chinese (Traditional)_Macao S.A.R..950", "ZHM"},
+ {"Chinese_Macao S.A.R..950", "ZHM"}
};
char *
@@ -85,10 +84,10 @@ pgwin32_setlocale(int category, const char *locale)
if (match != NULL)
{
/* Found a match. Replace the matched string. */
- int matchpos = match - locale;
- int replacementlen = strlen(replacement);
- char *rest = match + strlen(needle);
- int restlen = strlen(rest);
+ int matchpos = match - locale;
+ int replacementlen = strlen(replacement);
+ char *rest = match + strlen(needle);
+ int restlen = strlen(rest);
alias = malloc(matchpos + replacementlen + restlen + 1);
if (!alias)
@@ -96,7 +95,8 @@ pgwin32_setlocale(int category, const char *locale)
memcpy(&alias[0], &locale[0], matchpos);
memcpy(&alias[matchpos], replacement, replacementlen);
- memcpy(&alias[matchpos + replacementlen], rest, restlen + 1); /* includes null terminator */
+ memcpy(&alias[matchpos + replacementlen], rest, restlen + 1); /* includes null
+ * terminator */
break;
}