|
@@ -73,7 +73,7 @@ void smt_init_evc(struct s_smc *smc)
|
|
{
|
|
{
|
|
struct s_srf_evc *evc ;
|
|
struct s_srf_evc *evc ;
|
|
const struct evc_init *init ;
|
|
const struct evc_init *init ;
|
|
- int i ;
|
|
|
|
|
|
+ unsigned int i ;
|
|
int index ;
|
|
int index ;
|
|
int offset ;
|
|
int offset ;
|
|
|
|
|
|
@@ -84,7 +84,7 @@ void smt_init_evc(struct s_smc *smc)
|
|
evc = smc->evcs ;
|
|
evc = smc->evcs ;
|
|
init = evc_inits ;
|
|
init = evc_inits ;
|
|
|
|
|
|
- for (i = 0 ; (unsigned) i < MAX_INIT_EVC ; i++) {
|
|
|
|
|
|
+ for (i = 0 ; i < MAX_INIT_EVC ; i++) {
|
|
for (index = 0 ; index < init->n ; index++) {
|
|
for (index = 0 ; index < init->n ; index++) {
|
|
evc->evc_code = init->code ;
|
|
evc->evc_code = init->code ;
|
|
evc->evc_para = init->para ;
|
|
evc->evc_para = init->para ;
|
|
@@ -98,7 +98,7 @@ void smt_init_evc(struct s_smc *smc)
|
|
init++ ;
|
|
init++ ;
|
|
}
|
|
}
|
|
|
|
|
|
- if ((unsigned) (evc - smc->evcs) > MAX_EVCS) {
|
|
|
|
|
|
+ if ((unsigned int) (evc - smc->evcs) > MAX_EVCS) {
|
|
SMT_PANIC(smc,SMT_E0127, SMT_E0127_MSG) ;
|
|
SMT_PANIC(smc,SMT_E0127, SMT_E0127_MSG) ;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -139,7 +139,7 @@ void smt_init_evc(struct s_smc *smc)
|
|
offset++ ;
|
|
offset++ ;
|
|
}
|
|
}
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|
|
- for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) {
|
|
|
|
|
|
+ for (i = 0, evc = smc->evcs ; i < MAX_EVCS ; i++, evc++) {
|
|
if (SMT_IS_CONDITION(evc->evc_code)) {
|
|
if (SMT_IS_CONDITION(evc->evc_code)) {
|
|
if (!evc->evc_cond_state) {
|
|
if (!evc->evc_cond_state) {
|
|
SMT_PANIC(smc,SMT_E0128, SMT_E0128_MSG) ;
|
|
SMT_PANIC(smc,SMT_E0128, SMT_E0128_MSG) ;
|
|
@@ -160,10 +160,10 @@ void smt_init_evc(struct s_smc *smc)
|
|
|
|
|
|
static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)
|
|
static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)
|
|
{
|
|
{
|
|
- int i ;
|
|
|
|
|
|
+ unsigned int i ;
|
|
struct s_srf_evc *evc ;
|
|
struct s_srf_evc *evc ;
|
|
|
|
|
|
- for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) {
|
|
|
|
|
|
+ for (i = 0, evc = smc->evcs ; i < MAX_EVCS ; i++, evc++) {
|
|
if (evc->evc_code == code && evc->evc_index == index)
|
|
if (evc->evc_code == code && evc->evc_index == index)
|
|
return evc;
|
|
return evc;
|
|
}
|
|
}
|
|
@@ -335,9 +335,9 @@ void smt_srf_event(struct s_smc *smc, int code, int index, int cond)
|
|
static void clear_all_rep(struct s_smc *smc)
|
|
static void clear_all_rep(struct s_smc *smc)
|
|
{
|
|
{
|
|
struct s_srf_evc *evc ;
|
|
struct s_srf_evc *evc ;
|
|
- int i ;
|
|
|
|
|
|
+ unsigned int i ;
|
|
|
|
|
|
- for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) {
|
|
|
|
|
|
+ for (i = 0, evc = smc->evcs ; i < MAX_EVCS ; i++, evc++) {
|
|
evc->evc_rep_required = FALSE ;
|
|
evc->evc_rep_required = FALSE ;
|
|
if (SMT_IS_CONDITION(evc->evc_code))
|
|
if (SMT_IS_CONDITION(evc->evc_code))
|
|
*evc->evc_cond_state = FALSE ;
|
|
*evc->evc_cond_state = FALSE ;
|
|
@@ -348,10 +348,10 @@ static void clear_all_rep(struct s_smc *smc)
|
|
static void clear_reported(struct s_smc *smc)
|
|
static void clear_reported(struct s_smc *smc)
|
|
{
|
|
{
|
|
struct s_srf_evc *evc ;
|
|
struct s_srf_evc *evc ;
|
|
- int i ;
|
|
|
|
|
|
+ unsigned int i ;
|
|
|
|
|
|
smc->srf.any_report = FALSE ;
|
|
smc->srf.any_report = FALSE ;
|
|
- for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) {
|
|
|
|
|
|
+ for (i = 0, evc = smc->evcs ; i < MAX_EVCS ; i++, evc++) {
|
|
if (SMT_IS_CONDITION(evc->evc_code)) {
|
|
if (SMT_IS_CONDITION(evc->evc_code)) {
|
|
if (*evc->evc_cond_state == FALSE)
|
|
if (*evc->evc_cond_state == FALSE)
|
|
evc->evc_rep_required = FALSE ;
|
|
evc->evc_rep_required = FALSE ;
|
|
@@ -375,7 +375,7 @@ static void smt_send_srf(struct s_smc *smc)
|
|
struct s_srf_evc *evc ;
|
|
struct s_srf_evc *evc ;
|
|
SK_LOC_DECL(struct s_pcon,pcon) ;
|
|
SK_LOC_DECL(struct s_pcon,pcon) ;
|
|
SMbuf *mb ;
|
|
SMbuf *mb ;
|
|
- int i ;
|
|
|
|
|
|
+ unsigned int i ;
|
|
|
|
|
|
static const struct fddi_addr SMT_SRF_DA = {
|
|
static const struct fddi_addr SMT_SRF_DA = {
|
|
{ 0x80, 0x01, 0x43, 0x00, 0x80, 0x08 }
|
|
{ 0x80, 0x01, 0x43, 0x00, 0x80, 0x08 }
|
|
@@ -405,7 +405,7 @@ static void smt_send_srf(struct s_smc *smc)
|
|
smt_add_para(smc,&pcon,(u_short) SMT_P1033,0,0) ;
|
|
smt_add_para(smc,&pcon,(u_short) SMT_P1033,0,0) ;
|
|
smt_add_para(smc,&pcon,(u_short) SMT_P1034,0,0) ;
|
|
smt_add_para(smc,&pcon,(u_short) SMT_P1034,0,0) ;
|
|
|
|
|
|
- for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) {
|
|
|
|
|
|
+ for (i = 0, evc = smc->evcs ; i < MAX_EVCS ; i++, evc++) {
|
|
if (evc->evc_rep_required) {
|
|
if (evc->evc_rep_required) {
|
|
smt_add_para(smc,&pcon,evc->evc_para,
|
|
smt_add_para(smc,&pcon,evc->evc_para,
|
|
(int)evc->evc_index,0) ;
|
|
(int)evc->evc_index,0) ;
|