cvs commit: src/sys/net if_tap.c

Christian S.J. Peron csjp at FreeBSD.org
Sat Nov 4 20:54:38 UTC 2006


csjp        2006-11-04 20:54:38 UTC

  FreeBSD src repository

  Modified files:
    sys/net              if_tap.c 
  Log:
  Currently, we initialize "error" to zero when it's declared, then
  we never initialize it to anything else. However, in the case that
  m_uiotombuf fails, we return error (effectively reporting success).
  
  This appears to be a relic of an older revision of this file, where
  "error" used to be doing something useful. (See revision 1.1, where
  error is used in a loop with uiomove() instead of using m_uiotomubf).
  
  So instead on unconditionally reporting success in the case there is
  a failure in m_uiotombuf, explicitly return ENOBUFS. While we are
  here, garbage collect the error variable since it's no longer required.
  
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.65      +1 -2      src/sys/net/if_tap.c


More information about the cvs-src mailing list