File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,8 @@ union stat_series_slot {
98
98
unsigned int nr ;
99
99
} avg ;
100
100
struct {
101
- unsigned long true ;
102
- unsigned long false ;
101
+ unsigned long t ;
102
+ unsigned long f ;
103
103
} perc ;
104
104
long acc ;
105
105
};
@@ -919,8 +919,8 @@ inline static void reset_stat_series_slot(struct stat_series *ss, union stat_ser
919
919
ss -> cache .acc -= slot -> acc ;
920
920
break ;
921
921
case STAT_ALG_PERC :
922
- ss -> cache .perc .true -= slot -> perc .true ;
923
- ss -> cache .perc .false -= slot -> perc .false ;
922
+ ss -> cache .perc .t -= slot -> perc .t ;
923
+ ss -> cache .perc .f -= slot -> perc .f ;
924
924
break ;
925
925
default :
926
926
LM_ERR ("unknown profile algorithm %d\n" , ss -> profile -> algorithm );
@@ -984,9 +984,9 @@ static unsigned long get_stat_series(struct stat_series *ss)
984
984
ret = ss -> cache .acc ;
985
985
break ;
986
986
case STAT_ALG_PERC :
987
- total = ss -> cache .perc .true + ss -> cache .perc .false ;
987
+ total = ss -> cache .perc .t + ss -> cache .perc .f ;
988
988
if (total != 0 )
989
- ret = ss -> cache .perc .true * ss -> profile -> factor / total ;
989
+ ret = ss -> cache .perc .t * ss -> profile -> factor / total ;
990
990
break ;
991
991
default :
992
992
LM_ERR ("unknown profile algorithm %d\n" , ss -> profile -> algorithm );
@@ -1072,11 +1072,11 @@ static int update_stat_series(struct stat_series *ss, int value)
1072
1072
break ;
1073
1073
case STAT_ALG_PERC :
1074
1074
if (value > 0 ) {
1075
- s -> perc .true += value ;
1076
- ss -> cache .perc .true += value ;
1075
+ s -> perc .t += value ;
1076
+ ss -> cache .perc .t += value ;
1077
1077
} else {
1078
- s -> perc .false -= value ;
1079
- ss -> cache .perc .false -= value ;
1078
+ s -> perc .f -= value ;
1079
+ ss -> cache .perc .f -= value ;
1080
1080
}
1081
1081
break ;
1082
1082
default :
You can’t perform that action at this time.
0 commit comments