Changeset - ecb6efb70fb1
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-12 18:02:54

changed the \".\" to \"->\" in add_job_to_queue function because the structures are pointers.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -312,14 +312,14 @@ void add_job_to_queue(struct distrenjob 
 
  struct distrenjob *current_job;     // create pointer to current_job (which job is being compared to)
 

	
 
  // iterate through linked list of jobs
 
  for(current_job = head; current_job != NULL; current_job = current_job.next){
 
  for(current_job = head; current_job != NULL; current_job = current_job->next){
 
    if(current_job == NULL){ // if it has reached the end of the list, add job there
 
      current_job = job;
 
      break;
 
    }
 
    else if(job.priority < current_job.priority){ // if job's priority is less than current_job's priority, insert job
 
      prev_job.next = job;                        // keep in mind 1 is the lowest priority
 
      job.next = current_job;
 
    else if(job->priority < current_job->priority){ // if job's priority is less than current_job's priority, insert job
 
      prev_job->next = job;                        // keep in mind 1 is the lowest priority
 
      job->next = current_job;
 
      break;
 
    }
 
  } // end of for statement
0 comments (0 inline, 0 general)