[LCP]linked list question

Chuck Martin nrocinu at myrealbox.com
Tue Apr 2 18:58:04 UTC 2002


On Sat, Mar 30, 2002 at 01:51:11PM +0100, Joachim Bauernberger wrote:
>  int firstrun=1; 
>  mbody_t *first = NULL;

These should both be declared static.  Otherwise, firstrun will be 1 and
first will be NULL every time push() is called, instead of just the first
time.

Chuck





More information about the linuxCprogramming mailing list