[hamradio-commits] [gnss-sdr] 132/251: checking return values
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit 650045fb94fd37f4c58e268cdacc1daba89709a0
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Sat May 23 09:44:47 2015 +0200
checking return values
---
src/algorithms/PVT/libs/rtcm_printer.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc
index 22aeea1..1c84239 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.cc
+++ b/src/algorithms/PVT/libs/rtcm_printer.cc
@@ -84,14 +84,16 @@ Rtcm_Printer::~Rtcm_Printer()
long pos;
rtcm_file_descriptor.close();
pos = rtcm_file_descriptor.tellp();
- if (pos == 0) remove(rtcm_filename.c_str());
+ if (pos == 0)
+ {
+ if(remove(rtcm_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary file";
+ }
}
close_serial();
}
-
int Rtcm_Printer::init_serial(std::string serial_device)
{
/*!
@@ -108,7 +110,7 @@ int Rtcm_Printer::init_serial(std::string serial_device)
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
if (fd == -1) return fd; // failed to open TTY port
- fcntl(fd, F_SETFL, 0); // clear all flags on descriptor, enable direct I/O
+ if(fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
tcgetattr(fd, &options); // read serial port options
BAUD = B9600;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list