#include "sizeof.h"
#include "string/strcpy/strncpy.h"
#include "string/strcpy/strtcpy.h"
-#include "string/strcpy/zustr2stp.h"
+#include "string/strdup/xstrndup.h"
#ident "$Id$"
#if defined(HAVE_STRUCT_UTMPX_UT_HOST)
if ((ut != NULL) && (ut->ut_host[0] != '\0')) {
- char *hostname;
-
- hostname = XMALLOC(sizeof(ut->ut_host) + 1, char);
- ZUSTR2STP(hostname, ut->ut_host);
- *out = hostname;
+ *out = XSTRNDUP(ut->ut_host);
free (ut);
} else {
*out = NULL;
#if defined(HAVE_STRUCT_UTMPX_UT_HOST)
} else if ( (NULL != ut)
&& ('\0' != ut->ut_host[0])) {
- hostname = XMALLOC(NITEMS(ut->ut_host) + 1, char);
- ZUSTR2STP(hostname, ut->ut_host);
+ hostname = XSTRNDUP(ut->ut_host);
#endif
}