FreeBSD/contrib/bsnmp/snmpd/main.c
/*
 * Define a macro from the command line
 */
Define a macro from the command line
Define a macro from the command line
static void
do_macro(char *arg)
{
	char *eq;
	int err;
	if ((eq = strchr(arg, '=')) == NULL)
		err = define_macro(arg, "");
	else {
		*eq++ = '\0';
		err = define_macro(arg, eq);
	}
	if (err == -1) {
		syslog(LOG_ERR, "cannot save macro: %m");
		exit(1);
	}
}
static void do_macro ( char * arg ) { char * eq ; int err ; if ( ( eq = strchr ( arg , ' ' ) ) == NULL ) err = define_macro ( arg , " " ) ; else { * eq ++ = ' \0 ' ; err = define_macro ( arg , eq ) ; } if ( err == -1 ) { syslog ( LOG_ERR , " " ) ; exit ( 1 ) ; } }
Define a macro from the command line
Define a macro from the command line