You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/07/29 18:53:56 UTC
[mynewt-core] 01/04: hw/sensor: Initialize `rc` before returning it
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit b63e9c1ecf02f62f2b24d3d760eda98bb2bc9da0
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Tue Jun 4 17:05:31 2019 -0700
hw/sensor: Initialize `rc` before returning it
---
hw/sensor/src/sensor_shell.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/sensor/src/sensor_shell.c b/hw/sensor/src/sensor_shell.c
index b8deaa8..4c401af 100644
--- a/hw/sensor/src/sensor_shell.c
+++ b/hw/sensor/src/sensor_shell.c
@@ -108,6 +108,8 @@ sensor_cmd_display_type(char **argv)
struct sensor *sensor;
unsigned int type;
+ rc = 0;
+
/* Look up sensor by name */
sensor = sensor_mgr_find_next_bydevname(argv[2], NULL);
if (!sensor) {