"Fossies" - the Fresh Open Source Software Archive

Member "drbd-9.0.21-1/drbd/drbd-kernel-compat/cocci/hlist_for_each_entry__no_has_three_parameters.cocci" (11 Nov 2019, 406 Bytes) of package /linux/misc/drbd-9.0.21-1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 @@
    2 iterator hlist_for_each_entry =~ "hlist_for_each_entry";
    3 expression pos, head;
    4 identifier memb;
    5 @@
    6 - hlist_for_each_entry(pos, head, memb)
    7 + for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), memb); pos; pos = hlist_entry_safe((pos)->memb.next, typeof(*(pos)), memb))
    8 {
    9 ...
   10 }
   11 
   12 @@
   13 expression ptr, memb;
   14 type typ;
   15 @@
   16 - hlist_entry_safe(ptr, typ, memb)
   17 + (ptr) ? hlist_entry(ptr, typ, memb) : NULL