fs/procfs: Add missing conditional check
Adds missed conditional check and config dependency
@@ -477,8 +477,10 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile, FAR struct tcb_s *
buffer += copysize;
remaining -= copysize;
+ if (totalsize >= buflen) {
return totalsize;
}
+ }
#endif
/* Show the task argument list (skipping over the name) */
@@ -576,10 +578,11 @@ static ssize_t proc_stack(FAR struct proc_file_s *procfile, FAR struct tcb_s *tc
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset);
totalsize += copysize;
+
+#ifdef CONFIG_STACK_COLORATION
buffer += copysize;
remaining -= copysize;
-#ifdef CONFIG_DEBUG_COLORATION
if (totalsize >= buflen) {
return totalsize;
}
