summaryrefslogtreecommitdiffstats
path: root/liblog/fake_log_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'liblog/fake_log_device.c')
-rw-r--r--liblog/fake_log_device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c
index 5283619..8d31060 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -320,11 +320,11 @@ static const char* getPriorityString(int priority)
* Make up something to replace it.
*/
static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) {
- int result = 0;
- struct iovec* end = iov + iovcnt;
+ ssize_t result = 0;
+ const struct iovec* end = iov + iovcnt;
for (; iov < end; iov++) {
- int w = write(fd, iov->iov_base, iov->iov_len);
- if (w != iov->iov_len) {
+ ssize_t w = write(fd, iov->iov_base, iov->iov_len);
+ if (w != (ssize_t) iov->iov_len) {
if (w < 0)
return w;
return result + w;