summaryrefslogtreecommitdiff
path: root/libutils/Tokenizer.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-06-30 08:22:24 -0700
committerElliott Hughes <enh@google.com>2015-06-30 10:41:15 -0700
commit6ed68cc412752e4c78755df9a1516e610ec66fa8 (patch)
tree287929b99130bf3a06b67b5abf2d3b4b6d8199f3 /libutils/Tokenizer.cpp
parent692dc75d9fbf5c256cd8c66219a930ae0fe9f523 (diff)
Consistently use strerror in libutils.
It's easier for people to debug, and side-steps the problem that errno values differ between architectures. Bug: http://b/17458391 Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
Diffstat (limited to 'libutils/Tokenizer.cpp')
-rw-r--r--libutils/Tokenizer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libutils/Tokenizer.cpp b/libutils/Tokenizer.cpp
index 610002fe3..2d0e83dcd 100644
--- a/libutils/Tokenizer.cpp
+++ b/libutils/Tokenizer.cpp
@@ -56,12 +56,12 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
int fd = ::open(filename.string(), O_RDONLY);
if (fd < 0) {
result = -errno;
- ALOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error opening file '%s': %s", filename.string(), strerror(errno));
} else {
struct stat stat;
if (fstat(fd, &stat)) {
result = -errno;
- ALOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error getting size of file '%s': %s", filename.string(), strerror(errno));
} else {
size_t length = size_t(stat.st_size);
@@ -83,7 +83,7 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
ssize_t nrd = read(fd, buffer, length);
if (nrd < 0) {
result = -errno;
- ALOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error reading file '%s': %s", filename.string(), strerror(errno));
delete[] buffer;
buffer = NULL;
} else {