aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandra Yates <alexandra.yates@linux.intel.com>2014-06-12 21:48:29 -0700
committerAlexandra Yates <alexandra.yates@linux.intel.com>2014-06-18 14:14:40 -0700
commit1d044cc75bc6600eefdb39e468eb052e81c5f3c8 (patch)
treebee38155ca52c806e2976eae80316627da04b371
parenta868a71b77afd77368bd6270296d63d5d2888233 (diff)
downloadpowertop-2.0-1d044cc75bc6600eefdb39e468eb052e81c5f3c8.tar.gz
fix-warnings: Ignoring return value of system()
Added error handling to system() for bluetooth.cpp. Tested by: Christophe Prigent Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
-rw-r--r--src/tuning/bluetooth.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tuning/bluetooth.cpp b/src/tuning/bluetooth.cpp
index 2b34277..92f5835 100644
--- a/src/tuning/bluetooth.cpp
+++ b/src/tuning/bluetooth.cpp
@@ -176,10 +176,12 @@ void bt_tunable::toggle(void)
good = good_bad();
if (good == TUNE_GOOD) {
- system("/usr/sbin/hciconfig hci0 up &> /dev/null &");
+ if(!system("/usr/sbin/hciconfig hci0 up &> /dev/null &"))
+ printf("System is not available\n");
return;
}
- system("/usr/sbin/hciconfig hci0 down &> /dev/null");
+ if(!system("/usr/sbin/hciconfig hci0 down &> /dev/null"))
+ printf("System is not available\n");
}
const char *bt_tunable::toggle_script(void)