/[dynamips]/upstream/dynamips-0.2.6-RC5/cpu.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.6-RC5/cpu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.6-RC4/cpu.c revision 5 by dpavlin, Sat Oct 6 16:08:03 2007 UTC upstream/dynamips-0.2.6-RC5/cpu.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC
# Line 31  cpu_mips_t *cpu_group_find_id(cpu_group_ Line 31  cpu_mips_t *cpu_group_find_id(cpu_group_
31  {  {
32     cpu_mips_t *cpu;     cpu_mips_t *cpu;
33    
34       if (!group)
35          return NULL;
36    
37     for(cpu=group->cpu_list;cpu;cpu=cpu->next)     for(cpu=group->cpu_list;cpu;cpu=cpu->next)
38        if (cpu->id == id)        if (cpu->id == id)
39           return cpu;           return cpu;
# Line 58  int cpu_group_find_highest_id(cpu_group_ Line 61  int cpu_group_find_highest_id(cpu_group_
61  /* Add a CPU in a CPU group */  /* Add a CPU in a CPU group */
62  int cpu_group_add(cpu_group_t *group,cpu_mips_t *cpu)  int cpu_group_add(cpu_group_t *group,cpu_mips_t *cpu)
63  {  {
64       if (!group)
65          return(-1);
66    
67     /* check that we don't already have a CPU with this id */     /* check that we don't already have a CPU with this id */
68     if (cpu_group_find_id(group,cpu->id) != NULL) {     if (cpu_group_find_id(group,cpu->id) != NULL) {
69        fprintf(stderr,"cpu_group_add: CPU%u already present in group.\n",        fprintf(stderr,"cpu_group_add: CPU%u already present in group.\n",

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.26