[Asterisk-Dev] possible bug in chan_sip

Kevin P. Fleming kpfleming at starnetworks.us
Thu Jan 13 08:26:22 MST 2005


Paul Cadach wrote:

> To eliminate such type of problems better is to use for() instead of while(). In current example usage of for()
> expression will be (from line 1136):
>   for(tmp = var; tmp; tmp = tmp->next) {
>     if(strcasecmp(tmp->name, "type"))
>       continue;
>     if(!strcasecmp(tmp->value, "user")) {
>       ast_destroy_realtime(var);
>       return NULL;
>     }
>   }

Yes, that's what I usually use when I write code from scratch, so that's 
why my brain thought "continue" alone was enough here.

Either fix is fine by me, just someone ought to get it posted soon so it 
can get into CVS.



More information about the asterisk-dev mailing list