title: list_head: get garbage if start parsing from second element
body: <p>I'm using in my C project list_head structure to define a linked_list. In some conditions I need to parse the list from the second element, but in this case I get an additional element with a garbage value. I tried with a small program in my pc to simulate the same scenario. I get the same issue:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include "list.h"
  
  struct struct_report{
          struct list_head list;
          char *report;
  };
  
  
  //Add an element to the linked list
  void add_report_to_list(struct list_head *reports, char *report) {
          struct struct_report *report_strct;
          report_strct = calloc(1, sizeof(struct struct_report));
          list_add_tail(&amp;report_strct-&gt;list, reports);
          report_strct-&gt;report= strdup(report);
  }
  
  int main() {
          struct struct_report *retreport;
          LIST_HEAD(reports); //instantiate a struct list_head instance
          add_report_to_list(&amp;reports, "elt1");
          add_report_to_list(&amp;reports, "elt2");
          add_report_to_list(&amp;reports, "elt3");
          add_report_to_list(&amp;reports, "elt4");
          list_for_each_entry(retreport, &amp;reports, list){
                  printf("============&gt; no next retreport: %s\n", retreport-&gt;report);
          }
          printf("\n");
          list_for_each_entry(retreport, reports.next, list){
                  printf("============&gt; Next retreport: %s\n", retreport-&gt;report);
          }
          return 1;
  } 
  </code></pre>
  
  <p>list.h is the same of linux: <a href="https://github.com/torvalds/linux/blob/master/include/linux/list.h" rel="nofollow noreferrer">https://github.com/torvalds/linux/blob/master/include/linux/list.h</a></p>
  
  <p>I get as an execution result the following trace:</p>
  
  <pre><code>============&gt; no next retreport: elt1
  ============&gt; no next retreport: elt2
  ============&gt; no next retreport: elt3
  ============&gt; no next retreport: elt4
  
  ============&gt; Next retreport: elt2
  ============&gt; Next retreport: elt3
  ============&gt; Next retreport: elt4
  ============&gt; Next retreport: 
  </code></pre>
  
  <p>It's clear that in the case I start parsing normally from the first element I don't have any problem. But in the case I start from the second element in the list I get an additional one with strange value like garbage.</p>
  
  <p>Has some an explanation why I get an additional element? And how I can fix it to parse until elt4?</p>