summaryrefslogtreecommitdiffstats
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 528361986..8d3106056 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2008 The Android Open Source Project 2 * Copyright (C) 2008-2014 The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -320,11 +320,11 @@ static const char* getPriorityString(int priority)
320 * Make up something to replace it. 320 * Make up something to replace it.
321 */ 321 */
322static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) { 322static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) {
323 int result = 0; 323 ssize_t result = 0;
324 struct iovec* end = iov + iovcnt; 324 const struct iovec* end = iov + iovcnt;
325 for (; iov < end; iov++) { 325 for (; iov < end; iov++) {
326 int w = write(fd, iov->iov_base, iov->iov_len); 326 ssize_t w = write(fd, iov->iov_base, iov->iov_len);
327 if (w != iov->iov_len) { 327 if (w != (ssize_t) iov->iov_len) {
328 if (w < 0) 328 if (w < 0)
329 return w; 329 return w;
330 return result + w; 330 return result + w;