summaryrefslogtreecommitdiff
path: root/lib/libutil/trimdomain.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-03-17 10:09:52 +0000
committerBrian Somers <brian@FreeBSD.org>2001-03-17 10:09:52 +0000
commita9c6c69f89085d10d79f08221d558ebb2970ddd8 (patch)
tree162707633e9c5fe40a6d6aed56401f9e1f3eeb4a /lib/libutil/trimdomain.c
parent8a24546c85d1bd2cf5c71ec245301ff0b7712bae (diff)
Notes
Diffstat (limited to 'lib/libutil/trimdomain.c')
-rw-r--r--lib/libutil/trimdomain.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/libutil/trimdomain.c b/lib/libutil/trimdomain.c
index b6464e04c9cb..61e0fdba1a55 100644
--- a/lib/libutil/trimdomain.c
+++ b/lib/libutil/trimdomain.c
@@ -24,9 +24,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
*/
+#if !defined(lint)
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif /* not lint */
+
#include <sys/param.h>
#include <libutil.h>
@@ -51,11 +55,11 @@ static int isDISP(const char *);
void
trimdomain(char *fullhost, int hostsize)
{
- static char domain[MAXHOSTNAMELEN];
- static int first = 1;
- static size_t dlen;
- char *s, *end;
- size_t len;
+ static size_t dlen;
+ static int first = 1;
+ static char domain[MAXHOSTNAMELEN];
+ char *end, *s;
+ size_t len;
if (first) {
/* XXX: Should we assume that our domain is this persistent ? */
@@ -96,7 +100,7 @@ trimdomain(char *fullhost, int hostsize)
static int
isDISP(const char *disp)
{
- int res, w;
+ int res, w;
w = strspn(disp, "0123456789");
res = 0;
@@ -110,6 +114,5 @@ isDISP(const char *disp)
res = 1; /* NN.NN */
}
}
-
return (res);
}