FreeBSD/lib/libjail/jail.c
/*
 * Clear a jail parameter and copy in its name.
 */
Clear a jail parameter and copy in its name.
Clear a jail parameter and copy in its name .
int
jailparam_init(struct jailparam *jp, const char *name)
{
	memset(jp, 0, sizeof(*jp));
	jp->jp_name = strdup(name);
	if (jp->jp_name == NULL) {
		strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN);
		return (-1);
	}
	if (jailparam_type(jp) < 0) {
		jailparam_free(jp, 1);
		jp->jp_name = NULL;
		jp->jp_value = NULL;
		return (-1);
	}
	return (0);
}
int jailparam_init ( struct jailparam * jp , const char * name ) { memset ( jp , 0 , sizeof ( * jp ) ) ; jp -> jp_name = strdup ( name ) ; if ( jp -> jp_name == NULL ) { strerror_r ( errno , jail_errmsg , JAIL_ERRMSGLEN ) ; return ( -1 ) ; } if ( jailparam_type ( jp ) < 0 ) { jailparam_free ( jp , 1 ) ; jp -> jp_name = NULL ; jp -> jp_value = NULL ; return ( -1 ) ; } return ( 0 ) ; }
Clear a jail parameter and copy in its name.
Clear a jail parameter and copy in its name .