https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
--- Comment #8 from Conrad Meyer <c...@freebsd.org> --- There's some way of declaring that a coccinelle variable ('buf') hasn't been reassigned since the earlier malloc call, although I don't recall how to do it. E.g., in this code, buf = malloc(M_WAITOK); ... buf = malloc(M_NOWAIT); if (buf == NULL) { /* this case shouldn't be removed */ } The null check shouldn't be removed. It's a weird and probably bad pattern to reuse the same C variable for allocation with a different policy in the same function, but possible. > Still need to look through / basic test the generated patch, but wanted to > share the Coccinelle spatch. Thanks! > It took a long time (at least 12 hours) to run on the src/sys tree. Yeah, it's not fast. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"