cvs commit: src/sys/vm vm_mmap.c

Alan Cox alc at cs.rice.edu
Sun Jun 17 05:14:55 UTC 2007


Matt Jacob wrote:

>mjacob      2007-06-17 04:17:49 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/vm               vm_mmap.c 
>  Log:
>  Make sure object is NULL- there is a possible case where you could
>  fall through to it being used w/o being set. Put a break in the default
>  case.
>  
>  Revision  Changes    Path
>  1.211     +2 -1      src/sys/vm/vm_mmap.c
>  
>

Actually, no.  handle_type is OBJT_DEFAULT only if flags has MAP_ANON 
set.  So, object was, in fact, being initialized to NULL a few lines 
after the switch:

    if (flags & MAP_ANON) {
        object = NULL;

In any case, I'm happy to see the warnings eliminated.

Regards,
Alan



More information about the cvs-src mailing list