Slight readability improvement: use an assert-like macro
[gnulib.git] / lib / xgetdomainname.c
index aaf50a9..13dde76 100644 (file)
@@ -1,5 +1,6 @@
 /* xgetdomainname.c -- Return the NIS domain name, without size limitations.
-   Copyright (C) 1992, 1996, 2000, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1996, 2000, 2001, 2003, 2004, 2006 Free Software
+   Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* Based on xgethostname.c, written by Jim Meyering.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 /* Specification.  */
 #include "xgetdomainname.h"
@@ -30,6 +29,9 @@
 /* Get errno.  */
 #include <errno.h>
 
+/* Get free.  */
+#include <stdlib.h>
+
 #include "xalloc.h"
 
 #ifndef INITIAL_DOMAINNAME_LENGTH
@@ -39,7 +41,8 @@
 /* Return the NIS domain name of the machine, in malloc'd storage.
    WARNING! The NIS domain name is unrelated to the fully qualified host name
             of the machine.  It is also unrelated to email addresses.
-   WARNING! The NIS domain name is usually the empty string when not using NIS.
+   WARNING! The NIS domain name is usually the empty string or "(none)" when
+            not using NIS.
    If malloc fails, exit.
    Upon any other failure, set errno and return NULL.  */
 char *