FreeBSD/contrib/ntp/ntpq/ntpq-subs.c
/*
 * readlist - send a read variables request with the variables on the list
 */
send a read variables request with the variables on the list
send a read variables request with the variables on the list
static void
readlist(
	struct parse *pcmd,
	FILE *fp
	)
{
	associd_t	associd;
	int		type;
	if (pcmd->nargs == 0) {
		associd = 0;
	} else {
		if (pcmd->argval[0].uval == 0)
			associd = 0;
		else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
			return;
	}
	type = (0 == associd)
		   ? TYPE_SYS
		   : TYPE_PEER;
	dolist(g_varlist, associd, CTL_OP_READVAR, type, fp);
}
static void readlist ( struct parse * pcmd , FILE * fp ) { associd_t associd ; int type ; if ( pcmd -> nargs == 0 ) { associd = 0 ; } else { if ( pcmd -> argval [ 0 ] . uval == 0 ) associd = 0 ; else if ( ( associd = checkassocid ( pcmd -> argval [ 0 ] . uval ) ) == 0 ) return ; } type = ( 0 == associd ) ? TYPE_SYS : TYPE_PEER ; dolist ( g_varlist , associd , CTL_OP_READVAR , type , fp ) ; }
readlist - send a read variables request with the variables on the list
readlist - send a read variables request with the variables on the list
/* HMS: I think we want the u_int32 target here, not the u_long */