Repository: trafficserver Updated Branches: refs/heads/master 8cfab344b -> 4cbf3cb0a
TS-3468: Fix print format, conditional typo. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4cbf3cb0 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4cbf3cb0 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4cbf3cb0 Branch: refs/heads/master Commit: 4cbf3cb0ad1610742b9faeab8fcb73c43c80ad76 Parents: 8cfab34 Author: Alan M. Carroll <[email protected]> Authored: Tue Mar 31 14:49:56 2015 -0500 Committer: Alan M. Carroll <[email protected]> Committed: Tue Mar 31 14:50:40 2015 -0500 ---------------------------------------------------------------------- iocore/cache/Cache.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4cbf3cb0/iocore/cache/Cache.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index c818cc7..cf8eaec 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -666,9 +666,9 @@ CacheProcessor::start_internal(int flags) struct stat sbuf; diskok = 0; if (-1 == fstat(fd, &sbuf)) { - fprintf(stderr, "Failed to stat cache file for directory %s", path) + fprintf(stderr, "Failed to stat cache file for directory %s\n", path) } else if (blocks != sbuf.st_size / STORE_BLOCK_SIZE) { - fprintf(stderr, "Cache file for directory %s is %" PRId64 " bytes, expected %" PRId64, path, sbuf.st_size, + fprintf(stderr, "Cache file for directory %s is %" PRId64 " bytes, expected %" PRId64 "\n", path, sbuf.st_size, blocks * STORE_BLOCK_SIZE); } else { diskok = 1; @@ -760,7 +760,7 @@ CacheProcessor::start_internal(int flags) if (fd >= 0) { if (!sd->file_pathname) { - if (check) { + if (!check) { if (ftruncate(fd, ((uint64_t)blocks) * STORE_BLOCK_SIZE) < 0) { Warning("unable to truncate cache file '%s' to %d blocks", path, blocks); diskok = 0; @@ -769,9 +769,9 @@ CacheProcessor::start_internal(int flags) struct stat sbuf; diskok = 0; if (-1 == fstat(fd, &sbuf)) { - fprintf(stderr, "Failed to stat cache file for directory %s", path); + fprintf(stderr, "Failed to stat cache file for directory %s\n", path); } else if (blocks != sbuf.st_size / STORE_BLOCK_SIZE) { - fprintf(stderr, "Cache file for directory %s is %" PRId64 " bytes, expected %" PRId64, path, sbuf.st_size, + fprintf(stderr, "Cache file for directory %s is %" PRId64 " bytes, expected %" PRId64 "\n", path, sbuf.st_size, blocks * static_cast<int64_t>(STORE_BLOCK_SIZE)); } else { diskok = 1;
