mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 17:01:19 +01:00
shell: fix compile warning and add some comments
This commit is contained in:
parent
3be2a3227a
commit
6634c56830
@ -45,8 +45,10 @@ static void(*find_handler(const shell_command_t *command_list, char *command))(c
|
||||
|
||||
const shell_command_t *entry;
|
||||
|
||||
for (int i = 0; i < sizeof(command_lists)/sizeof(entry); i++) {
|
||||
/* iterating over command_lists */
|
||||
for (unsigned int i = 0; i < sizeof(command_lists)/sizeof(entry); i++) {
|
||||
if ((entry = command_lists[i])) {
|
||||
/* iterating over commands in command_lists entry */
|
||||
while (entry->name != NULL) {
|
||||
if (strcmp(entry->name, command) == 0) {
|
||||
return entry->handler;
|
||||
@ -75,8 +77,10 @@ static void print_help(const shell_command_t *command_list)
|
||||
|
||||
const shell_command_t *entry;
|
||||
|
||||
for (int i = 0; i < sizeof(command_lists)/sizeof(entry); i++) {
|
||||
/* iterating over command_lists */
|
||||
for (unsigned int i = 0; i < sizeof(command_lists)/sizeof(entry); i++) {
|
||||
if ((entry = command_lists[i])) {
|
||||
/* iterating over commands in command_lists entry */
|
||||
while (entry->name != NULL) {
|
||||
printf("%-20s %s\n", entry->name, entry->desc);
|
||||
entry++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user