dmm: Remove unnecessary casts
This commit is contained in:
parent
7fb4ff0237
commit
94b1d50642
|
@ -519,7 +519,7 @@ SR_PRIV int sr_asycii_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent;
|
||||
struct asycii_info *info_local;
|
||||
|
||||
info_local = (struct asycii_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* Don't print byte 15. That one contains the carriage return. */
|
||||
sr_dbg("DMM packet: \"%.15s\"", buf);
|
||||
|
|
|
@ -373,7 +373,7 @@ SR_PRIV int sr_dtm0660_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct dtm0660_info *info_local;
|
||||
|
||||
info_local = (struct dtm0660_info *)info;
|
||||
info_local = info;
|
||||
|
||||
if ((ret = parse_value(buf, floatval, &exponent)) != SR_OK) {
|
||||
sr_dbg("Error parsing value: %d.", ret);
|
||||
|
|
|
@ -353,7 +353,7 @@ SR_PRIV int sr_fs9721_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
if ((ret = parse_value(buf, floatval, &exponent)) != SR_OK) {
|
||||
sr_dbg("Error parsing value: %d.", ret);
|
||||
|
@ -373,7 +373,7 @@ SR_PRIV void sr_fs9721_00_temp_c(struct sr_datafeed_analog *analog, void *info)
|
|||
{
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined FS9721_LP3 flag 'c2c1_00' means temperature (C). */
|
||||
if (info_local->is_c2c1_00) {
|
||||
|
@ -386,7 +386,7 @@ SR_PRIV void sr_fs9721_01_temp_c(struct sr_datafeed_analog *analog, void *info)
|
|||
{
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (C). */
|
||||
if (info_local->is_c2c1_01) {
|
||||
|
@ -399,7 +399,7 @@ SR_PRIV void sr_fs9721_10_temp_c(struct sr_datafeed_analog *analog, void *info)
|
|||
{
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined FS9721_LP3 flag 'c2c1_10' means temperature (C). */
|
||||
if (info_local->is_c2c1_10) {
|
||||
|
@ -412,7 +412,7 @@ SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *i
|
|||
{
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined FS9721_LP3 flag 'c2c1_01' means temperature (F). */
|
||||
if (info_local->is_c2c1_01) {
|
||||
|
@ -431,7 +431,7 @@ SR_PRIV void sr_fs9721_max_c_min(struct sr_datafeed_analog *analog, void *info)
|
|||
{
|
||||
struct fs9721_info *info_local;
|
||||
|
||||
info_local = (struct fs9721_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined FS9721_LP3 flag 'c2c1_00' means MAX. */
|
||||
if (info_local->is_c2c1_00)
|
||||
|
|
|
@ -359,7 +359,7 @@ SR_PRIV int sr_fs9922_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct fs9922_info *info_local;
|
||||
|
||||
info_local = (struct fs9922_info *)info;
|
||||
info_local = info;
|
||||
|
||||
if ((ret = parse_value(buf, floatval, &exponent)) != SR_OK) {
|
||||
sr_dbg("Error parsing value: %d.", ret);
|
||||
|
@ -379,7 +379,7 @@ SR_PRIV void sr_fs9922_z1_diode(struct sr_datafeed_analog *analog, void *info)
|
|||
{
|
||||
struct fs9922_info *info_local;
|
||||
|
||||
info_local = (struct fs9922_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* User-defined z1 flag means "diode mode". */
|
||||
if (info_local->is_z1) {
|
||||
|
|
|
@ -389,7 +389,7 @@ SR_PRIV int sr_metex14_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct metex14_info *info_local;
|
||||
|
||||
info_local = (struct metex14_info *)info;
|
||||
info_local = info;
|
||||
|
||||
/* Don't print byte 13. That one contains the carriage return. */
|
||||
sr_dbg("DMM packet: \"%.13s\"", buf);
|
||||
|
|
|
@ -336,7 +336,7 @@ SR_PRIV int sr_ut71x_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct ut71x_info *info_local;
|
||||
|
||||
info_local = (struct ut71x_info *)info;
|
||||
info_local = info;
|
||||
memset(info_local, 0, sizeof(struct ut71x_info));
|
||||
|
||||
if (!sr_ut71x_packet_valid(buf))
|
||||
|
|
|
@ -410,7 +410,7 @@ SR_PRIV int sr_vc870_parse(const uint8_t *buf, float *floatval,
|
|||
int ret, exponent = 0;
|
||||
struct vc870_info *info_local;
|
||||
|
||||
info_local = (struct vc870_info *)info;
|
||||
info_local = info;
|
||||
memset(info_local, 0, sizeof(struct vc870_info));
|
||||
|
||||
if (!sr_vc870_packet_valid(buf))
|
||||
|
|
Loading…
Reference in New Issue