examples: misc static code analysis fixes
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
bb3584fcdb
commit
32340f6819
@@ -56,12 +56,10 @@ main(int argc, char** argv)
|
||||
|
||||
//! [Interesting]
|
||||
mraa::Gpio* gpio = new mraa::Gpio(iopin);
|
||||
if (gpio == NULL) {
|
||||
return mraa::ERROR_UNSPECIFIED;
|
||||
}
|
||||
mraa::Result response = gpio->dir(mraa::DIR_OUT);
|
||||
if (response != mraa::SUCCESS) {
|
||||
mraa::printError(response);
|
||||
delete gpio;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user