for(baz = 1; baz <= 10; baz++)
current = (item *) malloc(sizeof(item));
current->foo = baz;
current->next = bar;
bar = current;
It works Natasl, but personally I do not like it and first thought it would not work until I realised its a bottom up linked list. ie the first node that is entered is actually the last in the list.
I would use a linked list with a head node, this gives you the entry point into the list, let me know if you would like an example.
Maybe I should say why I don't like it.
In my opinion a list should have the property of inserting/deleting a node at a given position, I can't see how you would accomplish this with your list.