This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e662d523b2072a3181a3ceb0789c7c50906f9b06
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Aug 26 18:17:28 2026 +0200

    libs/libc/elf: Fix the nxstyle errors in the lines this touches.
    
    CI feeds nxstyle the diff hunks with three lines of context, so style errors
    that are older than this change, in the lines around the hunks, fail the
    check job.  They are a switch body indented two columns too deep, an
    initializer brace one level in, and two declarations with no blank line
    after them.
    
    Whitespace only, no change in behaviour.
    
    Signed-off-by: Marco Casaroli <[email protected]>
---
 libs/libc/elf/elf_bind.c | 56 +++++++++++++++++++++++++-----------------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/libs/libc/elf/elf_bind.c b/libs/libc/elf/elf_bind.c
index c712ac6f5f0..dddb626add8 100644
--- a/libs/libc/elf/elf_bind.c
+++ b/libs/libc/elf/elf_bind.c
@@ -815,38 +815,38 @@ static int libelf_relocatedyn(FAR struct module_s *modp,
 
               if (sym[idx_sym].st_shndx == SHN_UNDEF)
                 {
-                    FAR void *ep;
-
-                    ep = libelf_findglobal(modp, loadinfo, symhdr,
-                                           &sym[idx_sym]);
-                    if ((ep == NULL) && (ELF_ST_BIND(sym[idx_sym].st_info)
-                        != STB_WEAK))
-                      {
-                        berr("ERROR: Unable to resolve addr of ext ref %s\n",
-                             loadinfo->iobuffer);
-                        ret = -EINVAL;
-                        lib_free(sym);
-                        lib_free(rels);
-                        lib_free(dyn);
-                        return ret;
-                      }
-
-                    addr = libelf_addr(loadinfo, rel->r_offset);
-
-                    if (reldata.relrela[idx_rel] == 1)
-                      {
-                        addr += rela->r_addend;
-                      }
-
-                    *(FAR uintptr_t *)addr = (uintptr_t)ep;
+                  FAR void *ep;
+
+                  ep = libelf_findglobal(modp, loadinfo, symhdr,
+                                         &sym[idx_sym]);
+                  if ((ep == NULL) && (ELF_ST_BIND(sym[idx_sym].st_info)
+                      != STB_WEAK))
+                    {
+                      berr("ERROR: Unable to resolve addr of ext ref %s\n",
+                           loadinfo->iobuffer);
+                      ret = -EINVAL;
+                      lib_free(sym);
+                      lib_free(rels);
+                      lib_free(dyn);
+                      return ret;
+                    }
+
+                  addr = libelf_addr(loadinfo, rel->r_offset);
+
+                  if (reldata.relrela[idx_rel] == 1)
+                    {
+                      addr += rela->r_addend;
+                    }
+
+                  *(FAR uintptr_t *)addr = (uintptr_t)ep;
                 }
             }
           else
             {
               Elf_Sym dynsym =
-                {
-                  0
-                };
+              {
+                0
+              };
 
               addr = libelf_addr(loadinfo, rel->r_offset);
 
@@ -943,6 +943,7 @@ int libelf_bind(FAR struct module_s *modp,
       /* Get the index to the relocation section */
 
       int infosec = loadinfo->shdr[i].sh_info;
+
       if (infosec >= loadinfo->ehdr.e_shnum)
         {
           continue;
@@ -1074,6 +1075,7 @@ errout_with_addrenv:
   if (loadinfo->addrenv != NULL)
     {
       int status = libelf_addrenv_restore(loadinfo);
+
       if (status < 0)
         {
           berr("ERROR: libelf_addrenv_restore() failed: %d\n", status);

Reply via email to