On Thu, Sep 12, 2019 at 03:37:42PM +0200, Markus Elfring wrote: > > - for (I = TAILQ_FIRST(H); I != NULL; I = TAILQ_NEXT(I, N)) S > > + TAILQ_FOREACH(I, H, N) S > > Can it make sense to avoid touching the (compound) statement at the end > so that only the loop header would be replaced? > > -for (I = TAILQ_FIRST(H); I != NULL; I = TAILQ_NEXT(I, N)) > +TAILQ_FOREACH(I, H, N) > S
Sure, that's a reasonable way to refactor the semantic patch. That works around the bug, too. Dave -- David Young [email protected] Urbana, IL (217) 721-9981 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
