Quote (carteblanche @ Apr 1 2013 01:20pm)
eventually you reach the end if jobname isn't found, which means cur_job-> next is null, so curr_job becomes null.
Yeah actually think it's my make method, it's supposed to initialize Goo and all it's pointers to NULL.
It doesn't seem to initialize the pointer's with NULL so not sure what, if anything, is wrong there.
Quote (carteblanche @ Apr 1 2013 01:20pm)
eventually you reach the end if jobname isn't found, which means cur_job-> next is null, so curr_job becomes null.
Also the loop should never reach cur->job = NULL b/c it exits when curr->job->next = NULL?
The code never goes into the if statement, so I'm assuming something is wrong when I intialize this_goo in make.
Code
/*insert file into linked list*/
if(goo->first_job == NULL){
goo->first_job = job_1;
job_1->next = NULL;
return 0;
}
This post was edited by lopelurag on Apr 1 2013 12:04pm