You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2012/10/19 07:17:34 UTC

[2/2] git commit: Format size_t with %zu

Format size_t with %zu


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/72ee5e0e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/72ee5e0e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/72ee5e0e

Branch: refs/heads/master
Commit: 72ee5e0e6cd65517032683c50b18cb4eec3fb28f
Parents: 3d9926a
Author: James Peach <jp...@apache.org>
Authored: Thu Oct 18 22:04:43 2012 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Oct 18 22:05:09 2012 -0700

----------------------------------------------------------------------
 lib/ts/ink_memory.cc |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72ee5e0e/lib/ts/ink_memory.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_memory.cc b/lib/ts/ink_memory.cc
index 5f43797..0ea6c3f 100644
--- a/lib/ts/ink_memory.cc
+++ b/lib/ts/ink_memory.cc
@@ -113,20 +113,20 @@ ats_memalign(size_t alignment, size_t size)
 
   if (unlikely(retcode)) {
     if (retcode == EINVAL) {
-      ink_fatal(1, "ats_memalign: couldn't allocate %d bytes at alignment %d - invalid alignment parameter",
-                (int)size, (int)alignment);
+      ink_fatal(1, "ats_memalign: couldn't allocate %zu bytes at alignment %zu - invalid alignment parameter",
+                size, alignment);
     } else if (retcode == ENOMEM) {
-      ink_fatal(1, "ats_memalign: couldn't allocate %d bytes at alignment %d - insufficient memory",
-                (int)size, (int)alignment);
+      ink_fatal(1, "ats_memalign: couldn't allocate %zu bytes at alignment %zu - insufficient memory",
+                size, alignment);
     } else {
-      ink_fatal(1, "ats_memalign: couldn't allocate %d bytes at alignment %d - unknown error %d",
-                (int)size, (int)alignment, retcode);
+      ink_fatal(1, "ats_memalign: couldn't allocate %zu bytes at alignment %zu - unknown error %d",
+                size, alignment, retcode);
     }
   }
 #else
   ptr = memalign(alignment, size);
   if (unlikely(ptr == NULL)) {
-    ink_fatal(1, "ats_memalign: couldn't allocate %d bytes at alignment %d", (int) size, (int) alignment);
+    ink_fatal(1, "ats_memalign: couldn't allocate %zu bytes at alignment %zu",  size,  alignment);
   }
 #endif
   return ptr;