diff mbox series

abg-reader.cc: Fix code indentation and tabify.

Message ID 20200328195434.179115-1-gprocida@google.com
State Committed
Headers show
Series abg-reader.cc: Fix code indentation and tabify. | expand

Commit Message

Giuliano Procida March 28, 2020, 7:54 p.m. UTC
* 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

Matthias Maennich March 29, 2020, 3:11 p.m. UTC | #1
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
>
>
Dodji Seketeli March 30, 2020, 9:53 a.m. UTC | #2
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!
diff mbox series

Patch

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;