https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240545
Bug ID: 240545 Summary: patch to remove unneeded M_WAITOK return value checks Product: Base System Version: 12.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: b...@freebsd.org Reporter: a...@watson.org Created attachment 207432 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=207432&action=edit remove NULL check and handling of it for M_WAITOK cases Attached is a patch that removes the check of malloc(9)'s return value against NULL when M_WAITOK flag is used. This does not cover all cases, but a number of them that I found with an LLVM pass and partial compilation of kernel. That pass also checks mallocarray(), realloc(), and reallocf(), but in the areas analyzed did not see the extra code. I am not sure I like the idea of removing NULL checks, but it is already handled. Are there any cases to be aware of for why the check would be necessary with M_WAITOK? If no, I will try to go through and look for others. The patch is for 12.0-RELEASE, but can adjust that as well. -- 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"