summaryrefslogtreecommitdiffstats
path: root/libprocessgroup
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-11-20 17:05:15 -0800
committerChih-Hung Hsieh <chh@google.com>2014-11-20 19:38:26 -0800
commitfcc8115dcf33b547facab9c6f2f4739f85ab69c1 (patch)
treefc31071565041c990a79398c95b567dc9faa6103 /libprocessgroup
parent07148ea2be8110e2310860c5e6a391e542a656be (diff)
downloadsystem_core-fcc8115dcf33b547facab9c6f2f4739f85ab69c1.zip
system_core-fcc8115dcf33b547facab9c6f2f4739f85ab69c1.tar.gz
system_core-fcc8115dcf33b547facab9c6f2f4739f85ab69c1.tar.bz2
Fix format string
Make a format string match the type of the parameter it represents Change-Id: I0af88636448084b56450996ea9dafdba3c1fd2a3 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org
Diffstat (limited to 'libprocessgroup')
-rw-r--r--libprocessgroup/processgroup.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 71c065e..4b09f24 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -20,6 +20,7 @@
#include <assert.h>
#include <dirent.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -100,7 +101,7 @@ static int refillBuffer(struct ctx *ctx)
ctx->buf_len += ret;
ctx->buf[ctx->buf_len] = 0;
- SLOGV("Read %d to buffer: %s", ret, ctx->buf);
+ SLOGV("Read %zd to buffer: %s", ret, ctx->buf);
assert(ctx->buf_len <= sizeof(ctx->buf));
@@ -251,7 +252,7 @@ int killProcessGroup(uid_t uid, int initialPid, int signal)
{
int processes;
int sleep_us = 100;
- long startTime = android::uptimeMillis();
+ int64_t startTime = android::uptimeMillis();
while ((processes = killProcessGroupOnce(uid, initialPid, signal)) > 0) {
SLOGV("killed %d processes for processgroup %d\n", processes, initialPid);
@@ -265,7 +266,7 @@ int killProcessGroup(uid_t uid, int initialPid, int signal)
}
}
- SLOGV("Killed process group uid %d pid %d in %ldms, %d procs remain", uid, initialPid,
+ SLOGV("Killed process group uid %d pid %d in %" PRId64 "ms, %d procs remain", uid, initialPid,
android::uptimeMillis()-startTime, processes);
if (processes == 0) {