title: Search into linked list
body: <pre><code>struct Players
  {
      int pid;                      /*Player's identifier*/
      int is_alien;                 /*Alien flag*/
      int evidence;                 /*Amount of evidence*/
      struct Players *prev;         /*Pointer to the previous node*/
      struct Players *next;         /*Pointer to the next node*/
      struct Tasks *tasks_head;     /*Pointer to the head of player's task list*/
      struct Tasks *tasks_sentinel; /*Pointer to the sentinel of player's task list*/
  };
  
  /**
   * Structure defining a node of the airplane linked list
   */
  struct Tasks
  {
      int tid;                      /*Task's identifier*/
      int difficulty;               /*Task's difficulty*/
      struct Tasks *next;           /*Pointer to the next node*/  
  };
  struct Player *players_head; //Global pointer 
  </code></pre>
  <p>So Im having these. I need to search for a player's Task.
  I have made</p>
  <pre><code>struct Players *player=players_head;
  struct Tasks *tasks,*test;
  test=(struct Tasks*)malloc(sizeof(struct Tasks));
  
  if(player == NULL) {
      return 0;
  }
  
  while(player != NULL) {
      test=player-&gt;tasks_head;
      //some other code..
  </code></pre>
  <p>My problem is why <code>test=player-&gt;task_head </code> is null. the problem is at <code>player-&gt;tasks_head</code>
  i have also tried  with  obj <code>tasks = player-&gt;tasks_head</code>any help? Thanks</p>