From 894611df040aaa1f085eef7be403d3ba0e85bbdf Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Wed, 1 Apr 2015 16:56:16 -0700 Subject: [PATCH] Linux: Fixed argc check in sensors_main Was checking for argc < 1, and should be argc < 2. Signed-off-by: Mark Charlebois --- src/modules/sensors/sensors_linux.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/sensors/sensors_linux.cpp b/src/modules/sensors/sensors_linux.cpp index dea1367ef9..01a0c0dee1 100644 --- a/src/modules/sensors/sensors_linux.cpp +++ b/src/modules/sensors/sensors_linux.cpp @@ -2253,8 +2253,9 @@ Sensors::start() int sensors_main(int argc, char *argv[]) { - if (argc < 1) { - errx(1, "usage: sensors {start|stop|status}"); + if (argc < 2) { + warnx("usage: sensors {start|stop|status}"); + return 0; } if (!strcmp(argv[1], "start")) {