FreeBSD/lib/libjail/jail.c
/*
 * Change a boolean parameter name into its "no" counterpart or vice versa.
 */
Change a boolean parameter name into its "no" counterpart or vice versa.
Change a boolean parameter name into its " no " counterpart or vice versa .
static char *
noname(const char *name)
{
	char *nname, *p;
	nname = malloc(strlen(name) + 3);
	if (nname == NULL) {
		strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN);
		return (NULL);
	}
	p = strrchr(name, '.');
	if (p != NULL)
		sprintf(nname, "%.*s.no%s", (int)(p - name), name, p + 1);
	else
		sprintf(nname, "no%s", name);
	return (nname);
}
static char * noname ( const char * name ) { char * nname , * p ; nname = malloc ( strlen ( name ) + 3 ) ; if ( nname == NULL ) { strerror_r ( errno , jail_errmsg , JAIL_ERRMSGLEN ) ; return ( NULL ) ; } p = strrchr ( name , ' ' ) ; if ( p != NULL ) sprintf ( nname , " " , ( int ) ( p - name ) , name , p + 1 ) ; else sprintf ( nname , " " , name ) ; return ( nname ) ; }
Change a boolean parameter name into its "no" counterpart or vice versa.
Change a boolean parameter name into its " no " counterpart or vice versa .