dmm: Remove unnecessary casts

This commit is contained in:
Frank Stettner 2018-02-14 21:04:09 +01:00 committed by Uwe Hermann
parent 7fb4ff0237
commit 94b1d50642
7 changed files with 13 additions and 13 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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) {

View File

@ -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);

View File

@ -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))

View File

@ -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))