Date: Mon, 10 Feb 2020 16:15:35 +0000 (UTC) From: Ulrich Spoerlein <uqs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r357732 - user/uqs/coverity Message-ID: <202002101615.01AGFZna022801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: uqs Date: Mon Feb 10 16:15:34 2020 New Revision: 357732 URL: https://svnweb.freebsd.org/changeset/base/357732 Log: ... and delete the model, because we currently no longer use it. Coverity apparently got smarter over time and will produce fewer false positives around kernel malloc when this model is *not* in use. Modified: user/uqs/coverity/model.c Modified: user/uqs/coverity/model.c ============================================================================== --- user/uqs/coverity/model.c Mon Feb 10 16:14:07 2020 (r357731) +++ user/uqs/coverity/model.c Mon Feb 10 16:15:34 2020 (r357732) @@ -6,30 +6,5 @@ * upload it via https://scan.coverity.com/projects/freebsd?tab=analysis_settings */ -/* From <sys/malloc.h>. */ -#define M_WAITOK 0x0002 -/* - * If M_WAIT_OK is set, malloc() will always return something meaningful. - */ -void * -malloc(unsigned long size, struct malloc_type *mtp, int flags) -{ - int has_memory; - - __coverity_negative_sink__(size); - - if (flags & M_WAITOK || has_memory) - return __coverity_alloc__(size); - - return 0; -} - -/* - * Don't complain about leaking FDs in unit tests. - */ -static void -leak(int fd) -{ - __coverity_close__(fd); -} +// Currently no special model is in use.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002101615.01AGFZna022801>