Commit d26396c5 authored by Jilay Pandya's avatar Jilay Pandya Committed by Alberto Escolar
Browse files

drivers: sensor: shell: fix logically deadcode issue

sca finds the code to be logically dead considering the size of long
to be 4 bytes.
- Solution: use uint64_t type for the variable `value`.

Signed-off-by: default avatarJilay Pandya <jilay.pandya@outlook.com>
parent 07fc70a6
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/sensor/sensor_shell.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ static int parse_sensor_value(const char *val_str, struct sensor_value *out)
{
	const bool is_negative = val_str[0] == '-';
	const char *decimal_pos = strchr(val_str, '.');
	long value;
	int64_t value;
	char *endptr;

	/* Parse int portion */