xiaoxiang781216 commented on code in PR #10585:
URL: https://github.com/apache/nuttx/pull/10585#discussion_r1321509232
##########
drivers/power/pm/pm_procfs.c:
##########
@@ -159,6 +161,23 @@ static FAR const char *g_pm_state[PM_COUNT] =
* Private Functions
****************************************************************************/
+static int pm_path_validate(FAR const char *relpath)
+{
+ int index = -1;
+
+ for (int i = 0; i < nitems(g_pm_files); i++)
Review Comment:
let's remove index and return i directly after match.
--
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]