Changeset 10ec9ae in rtems
- Timestamp:
- 08/05/03 19:06:56 (20 years ago)
- Children:
- 3605c4e
- Parents:
- 8ae3c6e8
- Location:
- cpukit/libmisc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libmisc/ChangeLog
r8ae3c6e8 r10ec9ae 1 2003-08-05 Till Strauman <strauman@slac.stanford.edu> 2 3 PR 436/rtems_misc 4 * monitor/mon-monitor.c: monitor registered commands list manipulation bugs 5 1 6 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 7 -
cpukit/libmisc/monitor/mon-monitor.c
r8ae3c6e8 r10ec9ae 429 429 ) 430 430 { 431 rtems_monitor_command_entry_t * p =rtems_registered_commands.next;431 rtems_monitor_command_entry_t **p = &rtems_registered_commands.next; 432 432 433 433 command->next = 0; 434 434 435 if (rtems_registered_commands.next) 436 { 437 for (; p->next; p = p->next) 438 { 439 if (STREQ(command->command, p->command)) 440 return 0; 441 } 442 p->next = command; 443 } 444 else 445 rtems_registered_commands.next = command; 446 435 while (*p) { 436 if ( STREQ(command->command, (*p)->command) ) 437 return 0; 438 p = & (*p)->next; 439 } 440 *p = command; 447 441 return 1; 448 442 } … … 453 447 ) 454 448 { 455 rtems_monitor_command_entry_t *p; 456 rtems_monitor_command_entry_t **p_prev = &rtems_registered_commands.next; 457 458 if (rtems_registered_commands.next) 459 { 460 for (p = rtems_registered_commands.next; p->next; p = p->next) 461 { 462 if (STREQ(command->command, p->command)) 463 { 464 *p_prev = p->next; 465 return 1; 466 } 467 p_prev = &p->next; 449 rtems_monitor_command_entry_t **p = & rtems_registered_commands.next; 450 451 while (*p) { 452 if ( STREQ(command->command, (*p)->command) ) { 453 *p = (*p)->next; 454 command->next = 0; 455 return 1; 468 456 } 457 p = & (*p)->next; 469 458 } 470 459 return 0; 460 471 461 } 472 462
Note: See TracChangeset
for help on using the changeset viewer.