XuNeo commented on code in PR #2698:
URL: https://github.com/apache/nuttx-apps/pull/2698#discussion_r1803352173


##########
testing/mm/mm_main.c:
##########
@@ -124,6 +124,17 @@ static struct mallinfo g_alloc_info;
  * Private Functions
  ****************************************************************************/
 
+static bool is_oversize(int size)
+{
+  if (size < 0)
+    {
+      return 0;
+    }
+
+  unsigned long threshold = g_alloc_info.mxordblk * 3 / 4;
+  return threshold < size;
+}

Review Comment:
   It feels more natural to return `size > threshold`.
   Also return false instead of 0 please.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to