pkarashchenko commented on a change in pull request #5855:
URL: https://github.com/apache/incubator-nuttx/pull/5855#discussion_r835789939



##########
File path: fs/procfs/fs_procfsmeminfo.c
##########
@@ -459,6 +460,27 @@ static ssize_t memdump_write(FAR struct file *filep, FAR 
const char *buffer,
   procfile = filep->f_priv;
   DEBUGASSERT(procfile);
 
+#ifdef CONFIG_DEBUG_MM
+  if (strcmp(buffer, "on") == 0)
+    {
+      for (entry = g_procfs_meminfo; entry != NULL; entry = entry->next)
+        {
+          entry->backtrace = true;
+        }
+
+      return buflen;
+    }
+  else if (strcmp(buffer, "off") == 0)
+    {
+      for (entry = g_procfs_meminfo; entry != NULL; entry = entry->next)
+        {
+          entry->backtrace = false;
+        }
+
+      return buflen;
+    }
+#endif

Review comment:
       Please ignore this message. I missed that return is needed.

##########
File path: fs/procfs/fs_procfsmeminfo.c
##########
@@ -459,6 +460,27 @@ static ssize_t memdump_write(FAR struct file *filep, FAR 
const char *buffer,
   procfile = filep->f_priv;
   DEBUGASSERT(procfile);
 
+#ifdef CONFIG_DEBUG_MM
+  if (strcmp(buffer, "on") == 0)
+    {
+      for (entry = g_procfs_meminfo; entry != NULL; entry = entry->next)
+        {
+          entry->backtrace = true;
+        }
+
+      return buflen;
+    }
+  else if (strcmp(buffer, "off") == 0)
+    {
+      for (entry = g_procfs_meminfo; entry != NULL; entry = entry->next)
+        {
+          entry->backtrace = false;
+        }
+
+      return buflen;
+    }
+#endif

Review comment:
       Please ignore this message. I missed that return is needed after the loop




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