ywkaras commented on a change in pull request #7614:
URL: https://github.com/apache/trafficserver/pull/7614#discussion_r603303041



##########
File path: include/tscore/ink_defs.h
##########
@@ -126,6 +122,21 @@ int ink_sys_name_release(char *name, int namelen, char 
*release, int releaselen)
 int ink_number_of_processors();
 int ink_login_name_max();
 
+#ifdef __cplusplus
+// Round up a value to be a multiple of m if necessary.
+//
+template <typename ArithmeticV, typename ArithmeticM>
+constexpr ArithmeticV
+ROUNDUP(ArithmeticV value, ArithmeticM m)
+{
+  ArithmeticV remainder = value % m;
+  if (remainder) {
+    value += m - remainder;
+  }
+  return value;
+}

Review comment:
       ink_defs.h is included by .c files, but they don't use ROUNDUP.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to