You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/27 07:13:19 UTC

svn commit: r948671 - /trafficserver/traffic/trunk/libinktomi++/ink_string++.cc

Author: mturk
Date: Thu May 27 05:13:18 2010
New Revision: 948671

URL: http://svn.apache.org/viewvc?rev=948671&view=rev
Log:
TS-376: Remove redundant alignment macros

Modified:
    trafficserver/traffic/trunk/libinktomi++/ink_string++.cc

Modified: trafficserver/traffic/trunk/libinktomi++/ink_string++.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_string%2B%2B.cc?rev=948671&r1=948670&r2=948671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/libinktomi++/ink_string++.cc (original)
+++ trafficserver/traffic/trunk/libinktomi++/ink_string++.cc Thu May 27 05:13:18 2010
@@ -262,9 +262,8 @@ StrList::overflow_heap_clean()
 
 
 #define INIT_OVERFLOW_ALIGNMENT      8
-#define ROUND(x,l)  (((x) + ((l) - 1L)) & ~((l) - 1L))
-
-const int overflow_head_hdr_size = ROUND(sizeof(StrListOverflow), INIT_OVERFLOW_ALIGNMENT);
+// XXX: This is basically INK_ALIGN_DEFAULT
+const int overflow_head_hdr_size = INK_ALIGN(sizeof(StrListOverflow), INIT_OVERFLOW_ALIGNMENT);
 
 void
 StrListOverflow::init()
@@ -295,7 +294,7 @@ StrListOverflow::alloc(int size, StrList
     int new_heap_size = heap_size * 2;
 
     if (new_heap_size < size) {
-      new_heap_size = ROUND(size, 2048);
+      new_heap_size = INK_ALIGN(size, 2048);
       ink_release_assert(new_heap_size >= size);
     }