summaryrefslogtreecommitdiffstats
path: root/liblog/fake_log_device.c
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-01-28 21:09:37 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-01-28 21:09:37 +0000
commitd2acdd82e613b3e1d79a00943ac3bf5fbc14a766 (patch)
treed7f0ff36ad86281f3fa4eb36978658711e7c2296 /liblog/fake_log_device.c
parent12db3eb6db3b80011043e404530012612a1d0fbf (diff)
parent44b99c22af84331068935a9bc3e807165a88237c (diff)
downloadsystem_core-d2acdd82e613b3e1d79a00943ac3bf5fbc14a766.zip
system_core-d2acdd82e613b3e1d79a00943ac3bf5fbc14a766.tar.gz
system_core-d2acdd82e613b3e1d79a00943ac3bf5fbc14a766.tar.bz2
Merge changes I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ...
* changes: libsysutils: SocketListener export release libsysutils: Add iovec/runOnEachSocket liblog: support struct logger_event_v2 format liblog: update timestamp on NOTICE file libcutils: resolve warning in iosched_policy.c liblog: Add const pedantics logcat: Add -T flag (-t w/o assumption of -d) logcat: Add logcat test suite liblog: Add cpu utilization test liblog: Add liblog test suite debuggerd: Support newline split in log messages liblog: deprecate export LOGGER ioctl definitions liblog: deprecate export of LOGGER_LOG_* defines liblog: Add README liblog: resolve build warning messages liblog: high CPU usage from logcat liblog: fix build again liblog: drop use of sys/cdefs.h liblog: git_master@964770 build problem logcat: Incorporate liblog reading API debuggerd: Incorporate liblog reading API liblog: Interface to support abstracting log read adb: deprecate legacy log service interface adb: regression from Move list.c to inlines liblog: whitespace cleanup libcutils: bug str_parms.c:str_parms_get_float(). libcutils: UNUSED argument warnings libsysutils: Get rid of warnings libcutils: Move list.c to inlines on list.h
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 be34f01..da83a85 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.
@@ -322,11 +322,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;