From: Paul M. <pm...@mv...> - 2001-06-19 07:15:19
|
On Mon, Jun 18, 2001 at 10:09:56PM -0700, Charles Duffy wrote: > @@ -354,7 +354,8 @@ > while (*handlerptr && (*handlerptr != handler)) > handlerptr = &((*handlerptr)->next); > > - *handlerptr = (*handlerptr)->next; > + if(*handlerptr) > + *handlerptr = (*handlerptr)->next; > > /* > * Remove minors. This brings up a few other potential issues in various other portions of the code. This current approach is far too ugly, there are all sorts of opportunities where it could be dereferencing NULL, etc. A more general solution for this kind of finding/removal of nodes from the linked list would likely be a better solution. What does everyone think about something like the attached patch as a more unified solution? Regards, -- Paul Mundt <pm...@mv...> MontaVista Software, Inc. |