abg-reader.cc: Fix code indentation and tabify.
Commit Message
* src/abg-reader.cc (build_elf_symbol_db): Fix code
indentation.
(build_array_type_def): Tabify.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-reader.cc | 50 +++++++++++++++++++++++------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
Comments
On Sat, Mar 28, 2020 at 07:54:34PM +0000, Android Kernel Team wrote:
> * src/abg-reader.cc (build_elf_symbol_db): Fix code
> indentation.
> (build_array_type_def): Tabify.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>---
> src/abg-reader.cc | 50 +++++++++++++++++++++++------------------------
> 1 file changed, 25 insertions(+), 25 deletions(-)
>
>diff --git a/src/abg-reader.cc b/src/abg-reader.cc
>index 019c0e99..340223d0 100644
>--- a/src/abg-reader.cc
>+++ b/src/abg-reader.cc
>@@ -3005,24 +3005,24 @@ build_elf_symbol_db(read_context& ctxt,
> {
> if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(x->first, "alias"))
> {
>- string alias_id = CHAR_STR(s);
>-
>- // Symbol aliases can be multiple separated by comma(,), split them
>- std::vector<std::string> elems;
>- std::stringstream aliases(alias_id);
>- std::string item;
>- while (std::getline(aliases, item, ','))
>- elems.push_back(item);
>- for (std::vector<string>::iterator alias = elems.begin();
>- alias != elems.end(); ++alias)
>- {
>- string_elf_symbol_sptr_map_type::const_iterator i =
>- id_sym_map.find(*alias);
>- ABG_ASSERT(i != id_sym_map.end());
>- ABG_ASSERT(i->second->is_main_symbol());
>-
>- x->second->get_main_symbol()->add_alias(i->second);
>- }
>+ string alias_id = CHAR_STR(s);
>+
>+ // Symbol aliases can be multiple separated by comma(,), split them
>+ std::vector<std::string> elems;
>+ std::stringstream aliases(alias_id);
>+ std::string item;
>+ while (std::getline(aliases, item, ','))
>+ elems.push_back(item);
>+ for (std::vector<string>::iterator alias = elems.begin();
>+ alias != elems.end(); ++alias)
>+ {
>+ string_elf_symbol_sptr_map_type::const_iterator i =
>+ id_sym_map.find(*alias);
>+ ABG_ASSERT(i != id_sym_map.end());
>+ ABG_ASSERT(i->second->is_main_symbol());
>+
>+ x->second->get_main_symbol()->add_alias(i->second);
>+ }
> }
> }
>
>@@ -4021,12 +4021,12 @@ build_array_type_def(read_context& ctxt,
> {
> size_in_bits = strtoull(CHAR_STR(s), &endptr, 0);
> if (*endptr != '\0')
>- {
>- if (!strcmp(CHAR_STR(s), "infinite"))
>- size_in_bits = (size_t) -1;
>- else
>- return nil;
>- }
>+ {
>+ if (!strcmp(CHAR_STR(s), "infinite"))
>+ size_in_bits = (size_t) -1;
>+ else
>+ return nil;
>+ }
> has_size_in_bits = true;
> }
>
>@@ -4034,7 +4034,7 @@ build_array_type_def(read_context& ctxt,
> {
> alignment_in_bits = strtoull(CHAR_STR(s), &endptr, 0);
> if (*endptr != '\0')
>- return nil;
>+ return nil;
> }
>
> string id;
>--
>2.26.0.rc2.310.g2932bb562d-goog
>
>
Matthias Maennich <maennich@google.com> a ?crit:
> On Sat, Mar 28, 2020 at 07:54:34PM +0000, Android Kernel Team wrote:
>> * src/abg-reader.cc (build_elf_symbol_db): Fix code
>> indentation.
>> (build_array_type_def): Tabify.
>>
>>Signed-off-by: Giuliano Procida <gprocida@google.com>
>
> Reviewed-by: Matthias Maennich <maennich@google.com>
Applied to master.
Thanks!
@@ -3005,24 +3005,24 @@ build_elf_symbol_db(read_context& ctxt,
{
if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(x->first, "alias"))
{
- string alias_id = CHAR_STR(s);
-
- // Symbol aliases can be multiple separated by comma(,), split them
- std::vector<std::string> elems;
- std::stringstream aliases(alias_id);
- std::string item;
- while (std::getline(aliases, item, ','))
- elems.push_back(item);
- for (std::vector<string>::iterator alias = elems.begin();
- alias != elems.end(); ++alias)
- {
- string_elf_symbol_sptr_map_type::const_iterator i =
- id_sym_map.find(*alias);
- ABG_ASSERT(i != id_sym_map.end());
- ABG_ASSERT(i->second->is_main_symbol());
-
- x->second->get_main_symbol()->add_alias(i->second);
- }
+ string alias_id = CHAR_STR(s);
+
+ // Symbol aliases can be multiple separated by comma(,), split them
+ std::vector<std::string> elems;
+ std::stringstream aliases(alias_id);
+ std::string item;
+ while (std::getline(aliases, item, ','))
+ elems.push_back(item);
+ for (std::vector<string>::iterator alias = elems.begin();
+ alias != elems.end(); ++alias)
+ {
+ string_elf_symbol_sptr_map_type::const_iterator i =
+ id_sym_map.find(*alias);
+ ABG_ASSERT(i != id_sym_map.end());
+ ABG_ASSERT(i->second->is_main_symbol());
+
+ x->second->get_main_symbol()->add_alias(i->second);
+ }
}
}
@@ -4021,12 +4021,12 @@ build_array_type_def(read_context& ctxt,
{
size_in_bits = strtoull(CHAR_STR(s), &endptr, 0);
if (*endptr != '\0')
- {
- if (!strcmp(CHAR_STR(s), "infinite"))
- size_in_bits = (size_t) -1;
- else
- return nil;
- }
+ {
+ if (!strcmp(CHAR_STR(s), "infinite"))
+ size_in_bits = (size_t) -1;
+ else
+ return nil;
+ }
has_size_in_bits = true;
}
@@ -4034,7 +4034,7 @@ build_array_type_def(read_context& ctxt,
{
alignment_in_bits = strtoull(CHAR_STR(s), &endptr, 0);
if (*endptr != '\0')
- return nil;
+ return nil;
}
string id;