Clean up errno logs and sto* conversions
I learned that we should be using PLOG to log errno strings, and we
should be avoiding stoi, stol, etc... conversions and instead use the
built in Android ParseInt/ParseUint functions.
Bug: 150250606
Bug: 150245058
Test: Manual for CLI tools, VTS for everything else
Change-Id: Icdd8a6af8564d5de3bedd1bc934f7928eb5e66e9
diff --git a/automotive/can/1.0/default/libnetdevice/can.cpp b/automotive/can/1.0/default/libnetdevice/can.cpp
index 06d45d3..a2a85dc 100644
--- a/automotive/can/1.0/default/libnetdevice/can.cpp
+++ b/automotive/can/1.0/default/libnetdevice/can.cpp
@@ -48,7 +48,7 @@
}
if (setsockopt(sock.get(), SOL_CAN_RAW, CAN_RAW_ERR_FILTER, &kErrMask, sizeof(kErrMask)) < 0) {
- LOG(ERROR) << "Can't receive error frames, CAN setsockpt failed: " << strerror(errno);
+ PLOG(ERROR) << "Can't receive error frames, CAN setsockpt failed";
return {};
}