diff options
author | Chih-Hung Hsieh <chh@google.com> | 2014-11-21 04:10:03 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-21 04:10:03 +0000 |
commit | dd6b662c4f20f89876cee7a52e4b6d9e33d2bfca (patch) | |
tree | 7a7ab1cd3c51609742039b0324f4225068265d42 | |
parent | 7474c77cf80d1e7b718b17071f156b1c99f0f1da (diff) | |
parent | 84babf397420528df3944636bc46bab741e21aea (diff) | |
download | system_core-dd6b662c4f20f89876cee7a52e4b6d9e33d2bfca.zip system_core-dd6b662c4f20f89876cee7a52e4b6d9e33d2bfca.tar.gz system_core-dd6b662c4f20f89876cee7a52e4b6d9e33d2bfca.tar.bz2 |
am 84babf39: Merge "Fix format string"
* commit '84babf397420528df3944636bc46bab741e21aea':
Fix format string
-rw-r--r-- | libprocessgroup/processgroup.cpp | 7 |
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) { |