Simon Marchi (simon.marchi@polymtl.ca): > Actually, I think you are confusing pointer and pointee. > lookup_cmd_1 checks if result_list is NULL, not if *result_list is > NULL. So with your version, since result_list is not NULL > (&last_line is not NULL, it's the address of the variable) > lookup_cmd_1 will set the last_line variable. There's no harm, but > since we don't care about that value it's not useful either. I > think what you want is: > > cmd = lookup_cmd_1 (&cmd_name, cmdlist, NULL, 1); You are absolutely right; I got confused by lookup_cmd_1's doc somehow. New patch in attachment. Thanks again!