summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/generic/util_localhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gssapi/generic/util_localhost.c')
-rw-r--r--src/lib/gssapi/generic/util_localhost.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/gssapi/generic/util_localhost.c b/src/lib/gssapi/generic/util_localhost.c
index 13856e320..2d3c27cb2 100644
--- a/src/lib/gssapi/generic/util_localhost.c
+++ b/src/lib/gssapi/generic/util_localhost.c
@@ -1,6 +1,7 @@
+/* -*- mode: c; indent-tabs-mode: nil -*- */
/*
* Copyright 1993 by OpenVision Technologies, Inc.
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
@@ -10,7 +11,7 @@
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
- *
+ *
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -34,17 +35,18 @@
#define MAXHOSTNAMELEN 64
#endif
-char *g_local_host_name()
+char *
+g_local_host_name(void)
{
- char buf[MAXHOSTNAMELEN+1], *ptr;
+ char buf[MAXHOSTNAMELEN+1], *ptr;
- if (gethostname(buf, sizeof(buf)) < 0)
- return 0;
+ if (gethostname(buf, sizeof(buf)) < 0)
+ return 0;
- buf[sizeof(buf)-1] = '\0';
+ buf[sizeof(buf)-1] = '\0';
- if (! (ptr = xmalloc(strlen(buf) + 1)))
- return 0;
+ if (! (ptr = xmalloc(strlen(buf) + 1)))
+ return 0;
- return strcpy(ptr, buf);
+ return strcpy(ptr, buf);
}