Author: asomers Date: Tue May 31 23:26:45 2016 New Revision: 301087 URL: https://svnweb.freebsd.org/changeset/base/301087
Log: Coverity fixes for r300906 lib/libdevdctl/consumer.cc In Consumer::DisconnectFromDevd, don't close the socket if it's already closed. cddl/usr.sbin/zfsd/case_file.cc lib/libdevdctl/consumer.h Delete dead code leftover from before devd(8) gained SOCK_SEQPACKET support Reported by: Coverity CID: 1356155, 1356169 Sponsored by: Spectra Logic Corp Modified: head/cddl/usr.sbin/zfsd/case_file.cc head/lib/libdevdctl/consumer.cc head/lib/libdevdctl/consumer.h Modified: head/cddl/usr.sbin/zfsd/case_file.cc ============================================================================== --- head/cddl/usr.sbin/zfsd/case_file.cc Tue May 31 23:14:15 2016 (r301086) +++ head/cddl/usr.sbin/zfsd/case_file.cc Tue May 31 23:26:45 2016 (r301087) @@ -83,7 +83,6 @@ using std::setfill; using std::setw; using DevdCtl::Event; -using DevdCtl::EventBuffer; using DevdCtl::EventFactory; using DevdCtl::EventList; using DevdCtl::Guid; Modified: head/lib/libdevdctl/consumer.cc ============================================================================== --- head/lib/libdevdctl/consumer.cc Tue May 31 23:14:15 2016 (r301086) +++ head/lib/libdevdctl/consumer.cc Tue May 31 23:26:45 2016 (r301087) @@ -129,10 +129,10 @@ Consumer::ConnectToDevd() void Consumer::DisconnectFromDevd() { - if (m_devdSockFD != -1) + if (m_devdSockFD != -1) { syslog(LOG_INFO, "Disconnecting from devd."); - - close(m_devdSockFD); + close(m_devdSockFD); + } m_devdSockFD = -1; } Modified: head/lib/libdevdctl/consumer.h ============================================================================== --- head/lib/libdevdctl/consumer.h Tue May 31 23:14:15 2016 (r301086) +++ head/lib/libdevdctl/consumer.h Tue May 31 23:26:45 2016 (r301087) @@ -44,8 +44,6 @@ namespace DevdCtl /*=========================== Forward Declarations ===========================*/ class Event; -class EventBuffer; -class FDReader; /*============================ Class Declarations ============================*/ /*----------------------------- DevdCtl::Consumer ----------------------------*/ @@ -139,16 +137,6 @@ protected: */ int m_devdSockFD; - /** - * Reader tied to the devd socket. - */ - FDReader *m_reader; - - /** - * Default EventBuffer connected to m_reader. - */ - EventBuffer *m_eventBuffer; - EventFactory m_eventFactory; /** Queued events for replay. */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"