[cli] style fixes and smaller enhancements (#5581)

This commit contains a group of style fixes and smaller enhancements
in CLI modules:
- Remove unnecessary `struct` when declaring variable.
- Remove use of single `"%s"` in `Output` methods.
- Fix order of `#include` headers.
- Remove unnecessary use of `OT_UNUSED_VARIABLE`.
- Remove unnecessary temp variables and casts.
- Add comments to `#endif` directives than are more than  than 20
  lines away from the corresponding `#if` they are associated with.
This commit is contained in:
Abtin Keshavarzian
2020-09-28 17:28:06 -07:00
committed by GitHub
parent 3d22a37267
commit 6b6a3b8f74
10 changed files with 78 additions and 105 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ otError Dataset::ProcessHelp(uint8_t aArgsLength, char *aArgs[])
for (const Command &command : sCommands)
{
mInterpreter.OutputLine("%s", command.mName);
mInterpreter.OutputLine(command.mName);
}
return OT_ERROR_NONE;