Commit 973a7aff authored by Francis Dupont's avatar Francis Dupont

[#1282] Addressed comments

parent ba83c314
......@@ -187,6 +187,5 @@ void Dhcp4to6Ipc::handler(int /* fd */) {
}
}
}; // namespace dhcp
}; // namespace isc
} // namespace dhcp
} // namespace isc
......@@ -219,8 +219,8 @@ CloseHATest::runPartners() {
nfd = accept_partner1;
}
// FD_SET(accept_partner2, &fds);
if (accept_partner1 > nfd) {
nfd = accept_partner1;
if (accept_partner2 > nfd) {
nfd = accept_partner2;
}
for (auto reader : readers) {
if (!reader.second) {
......@@ -258,7 +258,7 @@ CloseHATest::runPartners() {
if (fd < 0) {
cerr << "accept2 failed " << strerror(errno) << endl;
} else {
if (fcntl(fd, F_SETFL, O_NONBLOCK)) {
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
cerr << "fcntl NONBLOCK " << strerror(errno) << endl;
}
readers[fd] = true;
......@@ -268,7 +268,7 @@ CloseHATest::runPartners() {
if (!reader.second) {
continue;
}
int fd = reader.first;
int fd = reader.first;
if (FD_ISSET(fd, &fds)) {
char buf[128];
int cc = read(fd, buf, 128);
......
......@@ -150,16 +150,11 @@ HooksManager::unloadLibrariesInternal() {
// If there was another owner the previous library manager collection
// was not destroyed and libraries not closed.
if (!weak_lmc.expired()) {
boost::shared_ptr<LibraryManagerCollection> still_here = weak_lmc.lock();
if (still_here) {
// Restore the library manager collection.
boost::shared_ptr<LibraryManagerCollection> restored_lmc = weak_lmc.lock();
if (restored_lmc) {
lm_collection_ = restored_lmc;
return (false);
}
// The library manager collection was destroyed between calls to
// expired and lock.
// assert(weak_lmc.expired());
lm_collection_ = still_here;
return (false);
}
// Load the empty set of libraries.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment