unstick r357732

Revision 357732

Date:
2020/02/10 16:15:34
Author:
uqs
Revision 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.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • user/uqs/coverity/model.c

     
    6 6 * upload it via https://scan.coverity.com/projects/freebsd?tab=analysis_settings
    7 7 */
    8 8
    9 /* From <sys/malloc.h>. */
    10 #define M_WAITOK 0x0002
    11 9
    12 /*
    13 * If M_WAIT_OK is set, malloc() will always return something meaningful.
    14 */
    15 void *
    16 malloc(unsigned long size, struct malloc_type *mtp, int flags)
    17 {
    18 int has_memory;
    19
    20 __coverity_negative_sink__(size);
    21
    22 if (flags & M_WAITOK || has_memory)
    23 return __coverity_alloc__(size);
    24
    25 return 0;
    26 }
    27
    28 /*
    29 * Don't complain about leaking FDs in unit tests.
    30 */
    31 static void
    32 leak(int fd)
    33 {
    34 __coverity_close__(fd);
    35 }
    10 // Currently no special model is in use.