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
This commit is contained in:
parent
5d4447e0b7
commit
92c6a88b76
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,6 @@ namespace DevdCtl
|
||||
|
||||
/*=========================== Forward Declarations ===========================*/
|
||||
class Event;
|
||||
class EventBuffer;
|
||||
class FDReader;
|
||||
|
||||
/*============================ Class Declarations ============================*/
|
||||
/*----------------------------- DevdCtl::Consumer ----------------------------*/
|
||||
@ -139,16 +137,6 @@ class Consumer
|
||||
*/
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user