@@ -1112,21 +1112,13 @@ int is_value_in_range(neu_type_e tag_type, int64_t value, double value_d,
1112
1112
return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1113
1113
}
1114
1114
case NEU_TYPE_FLOAT :
1115
- if (write_type != NEU_TYPE_DOUBLE ) {
1116
- return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1117
- } else if (result < (int64_t ) - FLT_MAX ||
1118
- result > (int64_t ) FLT_MAX ) {
1115
+ if (result < (int64_t ) - FLT_MAX || result > (int64_t ) FLT_MAX ) {
1119
1116
return NEU_ERR_PLUGIN_TAG_VALUE_OUT_OF_RANGE ;
1120
1117
} else {
1121
1118
return NEU_ERR_SUCCESS ;
1122
1119
}
1123
1120
case NEU_TYPE_DOUBLE :
1124
- if (write_type != NEU_TYPE_DOUBLE ) {
1125
- return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1126
- } else {
1127
- return NEU_ERR_SUCCESS ;
1128
- }
1129
- return check_value (write_type , result , INT16_MIN , INT16_MAX );
1121
+ return NEU_ERR_SUCCESS ;
1130
1122
case NEU_TYPE_STRING :
1131
1123
case NEU_TYPE_BOOL :
1132
1124
case NEU_TYPE_BIT :
@@ -1170,20 +1162,13 @@ int is_value_in_range(neu_type_e tag_type, int64_t value, double value_d,
1170
1162
return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1171
1163
}
1172
1164
case NEU_TYPE_FLOAT :
1173
- if (write_type != NEU_TYPE_DOUBLE ) {
1174
- return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1175
- } else if (value < (int64_t ) - FLT_MAX ||
1176
- value > (int64_t ) FLT_MAX ) {
1165
+ if (value < (int64_t ) - FLT_MAX || value > (int64_t ) FLT_MAX ) {
1177
1166
return NEU_ERR_PLUGIN_TAG_VALUE_OUT_OF_RANGE ;
1178
1167
} else {
1179
1168
return NEU_ERR_SUCCESS ;
1180
1169
}
1181
1170
case NEU_TYPE_DOUBLE :
1182
- if (write_type != NEU_TYPE_DOUBLE ) {
1183
- return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
1184
- } else {
1185
- return NEU_ERR_SUCCESS ;
1186
- }
1171
+ return NEU_ERR_SUCCESS ;
1187
1172
case NEU_TYPE_STRING :
1188
1173
if (write_type != NEU_TYPE_STRING ) {
1189
1174
return NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH ;
0 commit comments