FreeBSD/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
/*
 * A safe form of strdup() which will die if the allocation fails.
 */
A safe form of strdup() which will die if the allocation fails.
A safe form of strdup () which will die if the allocation fails .
char *
zfs_strdup(libzfs_handle_t *hdl, const char *str)
{
	char *ret;
	if ((ret = strdup(str)) == NULL)
		(void) no_memory(hdl);
	return (ret);
}
char * zfs_strdup ( libzfs_handle_t * hdl , const char * str ) { char * ret ; if ( ( ret = strdup ( str ) ) == NULL ) ( void ) no_memory ( hdl ) ; return ( ret ) ; }
A safe form of strdup() which will die if the allocation fails.
A safe form of strdup () which will die if the allocation fails .