summaryrefslogtreecommitdiff
path: root/lib/xgethostname.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
committerBruno Haible <bruno@clisp.org>2009-12-10 20:28:30 +0100
commit441aa3044f43e5572f58c354f01e6bc070acd5c7 (patch)
treebef236e8058dd3469da28ffcd5a6a287222a4c50 /lib/xgethostname.c
parent039ae97b8ae35a2446c5d62d72b21689c97da7e2 (diff)
downloadgnulib-441aa3044f43e5572f58c354f01e6bc070acd5c7.tar.gz
Use spaces for indentation, not tabs.
Diffstat (limited to 'lib/xgethostname.c')
-rw-r--r--lib/xgethostname.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/xgethostname.c b/lib/xgethostname.c
index d649b8dcff..136acbeac2 100644
--- a/lib/xgethostname.c
+++ b/lib/xgethostname.c
@@ -45,8 +45,8 @@ xgethostname (void)
while (1)
{
/* Use SIZE_1 here rather than SIZE to work around the bug in
- SunOS 5.5's gethostname whereby it NUL-terminates HOSTNAME
- even when the name is as long as the supplied buffer. */
+ SunOS 5.5's gethostname whereby it NUL-terminates HOSTNAME
+ even when the name is as long as the supplied buffer. */
size_t size_1;
hostname = x2realloc (hostname, &size);
@@ -55,19 +55,19 @@ xgethostname (void)
errno = 0;
if (gethostname (hostname, size_1) == 0)
- {
- if (! hostname[size_1 - 1])
- break;
- }
+ {
+ if (! hostname[size_1 - 1])
+ break;
+ }
else if (errno != 0 && errno != ENAMETOOLONG && errno != EINVAL
- /* OSX/Darwin does this when the buffer is not large enough */
- && errno != ENOMEM)
- {
- int saved_errno = errno;
- free (hostname);
- errno = saved_errno;
- return NULL;
- }
+ /* OSX/Darwin does this when the buffer is not large enough */
+ && errno != ENOMEM)
+ {
+ int saved_errno = errno;
+ free (hostname);
+ errno = saved_errno;
+ return NULL;
+ }
}
return hostname;