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

build: fix wrong indent caused compile warning #10014

Merged
merged 2 commits into from Jul 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/kv/RocksDBStore.cc
Expand Up @@ -691,15 +691,17 @@ bool RocksDBStore::RocksDBWholeSpaceIteratorImpl::valid()
}
int RocksDBStore::RocksDBWholeSpaceIteratorImpl::next()
{
if (valid())
dbiter->Next();
if (valid()) {
dbiter->Next();
}
return dbiter->status().ok() ? 0 : -1;
}
int RocksDBStore::RocksDBWholeSpaceIteratorImpl::prev()
{
if (valid())
if (valid()) {
dbiter->Prev();
Copy link
Member

Choose a reason for hiding this comment

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

can you add {} around the if as well.. so that we're explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@theanalyst yeah, updated now.

return dbiter->status().ok() ? 0 : -1;
}
return dbiter->status().ok() ? 0 : -1;
}
string RocksDBStore::RocksDBWholeSpaceIteratorImpl::key()
{
Expand Down
22 changes: 11 additions & 11 deletions src/rgw/rgw_rest_swift.cc
Expand Up @@ -319,17 +319,17 @@ void RGWListBucket_ObjStore_SWIFT::send_response()
if (name.compare(delimiter) == 0)
goto next;

s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));

/* swift is a bit inconsistent here */
switch (s->format) {
case RGW_FORMAT_XML:
s->formatter->dump_string("name", name);
break;
default:
s->formatter->dump_string("subdir", name);
}
s->formatter->close_section();
s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));

/* swift is a bit inconsistent here */
switch (s->format) {
case RGW_FORMAT_XML:
s->formatter->dump_string("name", name);
break;
default:
s->formatter->dump_string("subdir", name);
}
s->formatter->close_section();
}
next:
if (do_objs)
Expand Down