[BACK]Return to uipc_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/uipc_socket.c between version 1.172 and 1.173

version 1.172, 2008/10/10 11:20:15 version 1.173, 2008/10/10 19:49:49
Line 77  __KERNEL_RCSID(0, "$NetBSD$");
Line 77  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/proc.h>  #include <sys/proc.h>
 #include <sys/file.h>  #include <sys/file.h>
 #include <sys/filedesc.h>  #include <sys/filedesc.h>
 #include <sys/malloc.h>  #include <sys/kmem.h>
 #include <sys/mbuf.h>  #include <sys/mbuf.h>
 #include <sys/domain.h>  #include <sys/domain.h>
 #include <sys/kernel.h>  #include <sys/kernel.h>
Line 1863  sockopt_alloc(struct sockopt *sopt, size
Line 1863  sockopt_alloc(struct sockopt *sopt, size
         KASSERT(sopt->sopt_size == 0);          KASSERT(sopt->sopt_size == 0);
   
         if (len > sizeof(sopt->sopt_buf))          if (len > sizeof(sopt->sopt_buf))
                 sopt->sopt_data = malloc(len, M_SOOPTS, M_WAITOK | M_ZERO);                  sopt->sopt_data = kmem_zalloc(len, KM_SLEEP);
         else          else
                 sopt->sopt_data = sopt->sopt_buf;                  sopt->sopt_data = sopt->sopt_buf;
   
Line 1893  sockopt_destroy(struct sockopt *sopt)
Line 1893  sockopt_destroy(struct sockopt *sopt)
 {  {
   
         if (sopt->sopt_data != sopt->sopt_buf)          if (sopt->sopt_data != sopt->sopt_buf)
                 free(sopt->sopt_data, M_SOOPTS);                  kmem_free(sopt->sopt_data, sopt->sopt_size);
   
         memset(sopt, 0, sizeof(*sopt));          memset(sopt, 0, sizeof(*sopt));
 }  }

Legend:
Removed from v.1.172  
changed lines
  Added in v.1.173

CVSweb <webmaster@jp.NetBSD.org>