Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journal: Trivial cleanup #19317

Merged
merged 1 commit into from Dec 15, 2017
Merged

Conversation

shinobu-x
Copy link
Contributor

Signed-off-by: Shinobu Kinjo shinobu@redhat.com

assert(m_trimmer == nullptr);
assert(m_player == nullptr);
assert(m_recorder == nullptr);
assert(!m_trimmer);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I prefer the original way (i.e. don't treat non-booleans as booleans).

@@ -231,6 +237,7 @@ void Journaler::create(uint8_t order, uint8_t splay_width,
int r = m_header_ioctx.aio_operate(m_header_oid, comp, &op);
assert(r == 0);
comp->release();
comp = nullptr;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: it's a local variable going out-of-scope immediately

os << *journaler.m_metadata;
} else {
os << "NULL";
os << "nullptr";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: find and replace fail?

@shinobu-x
Copy link
Contributor Author

@dillaman Please check, when you get a chance.

@shinobu-x shinobu-x force-pushed the journaler_trivial_cleanup branch 3 times, most recently from 4ac5c12 to 9c26f7e Compare December 5, 2017 00:46
Copy link

@amitkumar50 amitkumar50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

os << *journaler.m_metadata;
} else {
os << "NULL";
os << "failed to find and replace";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: in my original comment, I was attempting to say no need to change this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman We should say something here which is more helpful for users, shouldn't we?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure -- you can say "uninitialized"

Signed-off-by: Shinobu Kinjo <shinobu@redhat.com>
@shinobu-x
Copy link
Contributor Author

@dillaman finally i noticed you're absolutely right. i deleted such a stupid change.

Copy link

@dillaman dillaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants