From 45eebacbb4d1be26df70977e56e2bc0bd7662bc1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 8 Oct 2015 19:20:17 -0600 Subject: [PATCH] binfmt/: More spacing/alignment fixes --- binfmt/binfmt_execmodule.c | 4 ++-- binfmt/binfmt_exepath.c | 4 ++-- binfmt/binfmt_schedunload.c | 2 +- binfmt/elf.c | 2 +- binfmt/libelf/libelf_bind.c | 2 +- binfmt/libelf/libelf_ctors.c | 6 +++--- binfmt/libelf/libelf_dtors.c | 6 +++--- binfmt/libelf/libelf_init.c | 6 +++--- binfmt/libelf/libelf_load.c | 4 ++-- binfmt/libelf/libelf_read.c | 4 ++-- binfmt/libelf/libelf_sections.c | 10 ++++++---- binfmt/libelf/libelf_symbols.c | 4 ++-- binfmt/libelf/libelf_verify.c | 5 ++++- binfmt/libnxflat/libnxflat_bind.c | 28 ++++++++++++++-------------- binfmt/libnxflat/libnxflat_init.c | 5 +++-- binfmt/libnxflat/libnxflat_load.c | 5 +++-- binfmt/libnxflat/libnxflat_read.c | 4 ++-- binfmt/libnxflat/libnxflat_unload.c | 4 ++-- binfmt/nxflat.c | 6 +++--- binfmt/pcode.c | 2 +- binfmt/symtab_findorderedbyvalue.c | 2 +- 21 files changed, 61 insertions(+), 54 deletions(-) diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index ccc20063cb..f8701be8ce 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -159,7 +159,7 @@ int exec_module(FAR const struct binary_s *binp) /* Allocate a TCB for the new task. */ - tcb = (FAR struct task_tcb_s*)kmm_zalloc(sizeof(struct task_tcb_s)); + tcb = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s)); if (!tcb) { err = ENOMEM; @@ -189,7 +189,7 @@ int exec_module(FAR const struct binary_s *binp) * will need to change if/when we want to support dynamic stack allocation. */ - stack = (FAR uint32_t*)kumm_malloc(binp->stacksize); + stack = (FAR uint32_t *)kumm_malloc(binp->stacksize); if (!stack) { err = ENOMEM; diff --git a/binfmt/binfmt_exepath.c b/binfmt/binfmt_exepath.c index 3caf02e40d..c99ae8706a 100644 --- a/binfmt/binfmt_exepath.c +++ b/binfmt/binfmt_exepath.c @@ -190,7 +190,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath) * in the PATH variable have been considered. */ - for (;;) + for (; ; ) { /* Make sure that exepath->next points to the beginning of a string */ @@ -244,7 +244,7 @@ FAR char *exepath_next(EXEPATH_HANDLE handle, FAR const char *relpath) /* Verify that a regular file exists at this path */ - ret = stat(fullpath, &buf);; + ret = stat(fullpath, &buf); if (ret == OK && S_ISREG(buf.st_mode)) { return fullpath; diff --git a/binfmt/binfmt_schedunload.c b/binfmt/binfmt_schedunload.c index 3d897953df..89d5815918 100644 --- a/binfmt/binfmt_schedunload.c +++ b/binfmt/binfmt_schedunload.c @@ -84,7 +84,7 @@ FAR struct binary_s *g_unloadhead; * pid - The task ID of the child task * bin - This structure must have been allocated with kmm_malloc() and must * persist until the task unloads - + * * * Returned Value: * None diff --git a/binfmt/elf.c b/binfmt/elf.c index 2cb18fe919..7291389eba 100644 --- a/binfmt/elf.c +++ b/binfmt/elf.c @@ -198,7 +198,7 @@ static void elf_dumpentrypt(FAR struct binary_s *binp, } #endif - elf_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, + elf_dumpbuffer("Entry code", (FAR const uint8_t *)binp->entrypt, MIN(loadinfo->textsize - loadinfo->ehdr.e_entry, 512)); #ifdef CONFIG_ARCH_ADDRENV diff --git a/binfmt/libelf/libelf_bind.c b/binfmt/libelf/libelf_bind.c index 59782bb1ca..a4fd589613 100644 --- a/binfmt/libelf/libelf_bind.c +++ b/binfmt/libelf/libelf_bind.c @@ -113,7 +113,7 @@ static inline int elf_readrel(FAR struct elf_loadinfo_s *loadinfo, /* And, finally, read the symbol table entry into memory */ - return elf_read(loadinfo, (FAR uint8_t*)rel, sizeof(Elf32_Rel), offset); + return elf_read(loadinfo, (FAR uint8_t *)rel, sizeof(Elf32_Rel), offset); } /**************************************************************************** diff --git a/binfmt/libelf/libelf_ctors.c b/binfmt/libelf/libelf_ctors.c index 11d6b8810b..95f3884135 100644 --- a/binfmt/libelf/libelf_ctors.c +++ b/binfmt/libelf/libelf_ctors.c @@ -163,7 +163,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) { /* Allocate memory to hold a copy of the .ctor section */ - loadinfo->ctoralloc = (binfmt_ctor_t*)kumm_malloc(ctorsize); + loadinfo->ctoralloc = (binfmt_ctor_t *)kumm_malloc(ctorsize); if (!loadinfo->ctoralloc) { bdbg("Failed to allocate memory for .ctors\n"); @@ -174,7 +174,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) /* Read the section header table into memory */ - ret = elf_read(loadinfo, (FAR uint8_t*)loadinfo->ctors, ctorsize, + ret = elf_read(loadinfo, (FAR uint8_t *)loadinfo->ctors, ctorsize, shdr->sh_offset); if (ret < 0) { @@ -206,7 +206,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) * will be relocated via the normal mechanism. */ - loadinfo->ctors = (binfmt_ctor_t*)shdr->sh_addr; + loadinfo->ctors = (binfmt_ctor_t *)shdr->sh_addr; } } diff --git a/binfmt/libelf/libelf_dtors.c b/binfmt/libelf/libelf_dtors.c index d268ab1e26..1f4cdab7e3 100644 --- a/binfmt/libelf/libelf_dtors.c +++ b/binfmt/libelf/libelf_dtors.c @@ -163,7 +163,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) { /* Allocate memory to hold a copy of the .dtor section */ - loadinfo->ctoralloc = (binfmt_dtor_t*)kumm_malloc(dtorsize); + loadinfo->ctoralloc = (binfmt_dtor_t *)kumm_malloc(dtorsize); if (!loadinfo->ctoralloc) { bdbg("Failed to allocate memory for .dtors\n"); @@ -174,7 +174,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) /* Read the section header table into memory */ - ret = elf_read(loadinfo, (FAR uint8_t*)loadinfo->dtors, dtorsize, + ret = elf_read(loadinfo, (FAR uint8_t *)loadinfo->dtors, dtorsize, shdr->sh_offset); if (ret < 0) { @@ -206,7 +206,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) * will be relocated via the normal mechanism. */ - loadinfo->dtors = (binfmt_dtor_t*)shdr->sh_addr; + loadinfo->dtors = (binfmt_dtor_t *)shdr->sh_addr; } } diff --git a/binfmt/libelf/libelf_init.c b/binfmt/libelf/libelf_init.c index 2ba84bfefd..35414fca18 100644 --- a/binfmt/libelf/libelf_init.c +++ b/binfmt/libelf/libelf_init.c @@ -172,19 +172,19 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) /* Read the ELF ehdr from offset 0 */ - ret = elf_read(loadinfo, (FAR uint8_t*)&loadinfo->ehdr, sizeof(Elf32_Ehdr), 0); + ret = elf_read(loadinfo, (FAR uint8_t *)&loadinfo->ehdr, sizeof(Elf32_Ehdr), 0); if (ret < 0) { bdbg("Failed to read ELF header: %d\n", ret); return ret; } - elf_dumpbuffer("ELF header", (FAR const uint8_t*)&loadinfo->ehdr, sizeof(Elf32_Ehdr)); + elf_dumpbuffer("ELF header", (FAR const uint8_t *)&loadinfo->ehdr, sizeof(Elf32_Ehdr)); /* Verify the ELF header */ ret = elf_verifyheader(&loadinfo->ehdr); - if (ret <0) + if (ret < 0) { /* This may not be an error because we will be called to attempt loading * EVERY binary. If elf_verifyheader() does not recognize the ELF header, diff --git a/binfmt/libelf/libelf_load.c b/binfmt/libelf/libelf_load.c index c81be5c196..b5cef6c6e9 100644 --- a/binfmt/libelf/libelf_load.c +++ b/binfmt/libelf/libelf_load.c @@ -157,8 +157,8 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) /* Read each section into memory that is marked SHF_ALLOC + SHT_NOBITS */ bvdbg("Loaded sections:\n"); - text = (FAR uint8_t*)loadinfo->textalloc; - data = (FAR uint8_t*)loadinfo->dataalloc; + text = (FAR uint8_t *)loadinfo->textalloc; + data = (FAR uint8_t *)loadinfo->dataalloc; for (i = 0; i < loadinfo->ehdr.e_shnum; i++) { diff --git a/binfmt/libelf/libelf_read.c b/binfmt/libelf/libelf_read.c index dacd52347b..420c8f1808 100644 --- a/binfmt/libelf/libelf_read.c +++ b/binfmt/libelf/libelf_read.c @@ -68,9 +68,9 @@ ****************************************************************************/ #if defined(ELF_DUMP_READDATA) -static inline void elf_dumpreaddata(char *buffer, int buflen) +static inline void elf_dumpreaddata(FAR char *buffer, int buflen) { - uint32_t *buf32 = (uint32_t*)buffer; + FAR uint32_t *buf32 = (FAR uint32_t *)buffer; int i; int j; diff --git a/binfmt/libelf/libelf_sections.c b/binfmt/libelf/libelf_sections.c index 7aeff5a9e9..26189d7247 100644 --- a/binfmt/libelf/libelf_sections.c +++ b/binfmt/libelf/libelf_sections.c @@ -117,7 +117,7 @@ static inline int elf_sectname(FAR struct elf_loadinfo_s *loadinfo, buffer = loadinfo->iobuffer; bytesread = 0; - for (;;) + for (; ; ) { /* Get the number of bytes to read */ @@ -211,16 +211,18 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) /* Allocate memory to hold a working copy of the sector header table */ - loadinfo->shdr = (FAR Elf32_Shdr*)kmm_malloc(shdrsize); + loadinfo->shdr = (FAR FAR Elf32_Shdr *)kmm_malloc(shdrsize); if (!loadinfo->shdr) { - bdbg("Failed to allocate the section header table. Size: %ld\n", (long)shdrsize); + bdbg("Failed to allocate the section header table. Size: %ld\n", + (long)shdrsize); return -ENOMEM; } /* Read the section header table into memory */ - ret = elf_read(loadinfo, (FAR uint8_t*)loadinfo->shdr, shdrsize, loadinfo->ehdr.e_shoff); + ret = elf_read(loadinfo, (FAR uint8_t *)loadinfo->shdr, shdrsize, + loadinfo->ehdr.e_shoff); if (ret < 0) { bdbg("Failed to read section header table: %d\n", ret); diff --git a/binfmt/libelf/libelf_symbols.c b/binfmt/libelf/libelf_symbols.c index c2be4d193d..1769481558 100644 --- a/binfmt/libelf/libelf_symbols.c +++ b/binfmt/libelf/libelf_symbols.c @@ -107,7 +107,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo, bytesread = 0; - for (;;) + for (; ; ) { /* Get the number of bytes to read */ @@ -239,7 +239,7 @@ int elf_readsym(FAR struct elf_loadinfo_s *loadinfo, int index, /* And, finally, read the symbol table entry into memory */ - return elf_read(loadinfo, (FAR uint8_t*)sym, sizeof(Elf32_Sym), offset); + return elf_read(loadinfo, (FAR uint8_t *)sym, sizeof(Elf32_Sym), offset); } /**************************************************************************** diff --git a/binfmt/libelf/libelf_verify.c b/binfmt/libelf/libelf_verify.c index ee6c880f67..015d9d39fe 100644 --- a/binfmt/libelf/libelf_verify.c +++ b/binfmt/libelf/libelf_verify.c @@ -53,7 +53,10 @@ * Private Constant Data ****************************************************************************/ -static const char g_elfmagic[EI_MAGIC_SIZE] = { 0x7f, 'E', 'L', 'F' }; +static const char g_elfmagic[EI_MAGIC_SIZE] = +{ + 0x7f, 'E', 'L', 'F' +}; /**************************************************************************** * Private Functions diff --git a/binfmt/libnxflat/libnxflat_bind.c b/binfmt/libnxflat/libnxflat_bind.c index dfb1e911cc..3c1709b2a5 100644 --- a/binfmt/libnxflat/libnxflat_bind.c +++ b/binfmt/libnxflat/libnxflat_bind.c @@ -102,14 +102,14 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, uint32_t offset) { - uint32_t *addr; + FAR uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n", offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s)); if (offset < loadinfo->dsize) { - addr = (uint32_t*)(offset + loadinfo->dspace->region); + addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); *addr += (uint32_t)(loadinfo->ispace + sizeof(struct nxflat_hdr_s)); bvdbg(" After: %08x\n", *addr); @@ -141,14 +141,14 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, uint32_t offset) { - uint32_t *addr; + FAR uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { - addr = (uint32_t*)(offset + loadinfo->dspace->region); + addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); *addr += (uint32_t)(loadinfo->dspace->region); bvdbg(" After: %08x\n", *addr); @@ -183,14 +183,14 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo, uint32_t offset) { - uint32_t *addr; + FAR uint32_t *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { - addr = (uint32_t*)(offset + loadinfo->dspace->region); + addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); *addr += ((uint32_t)loadinfo->ispace - (uint32_t)(loadinfo->dspace->region)); bvdbg(" After: %08x\n", *addr); @@ -231,7 +231,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) /* The NXFLAT header is the first thing at the beginning of the ISpace. */ - hdr = (FAR struct nxflat_hdr_s*)loadinfo->ispace; + hdr = (FAR struct nxflat_hdr_s *)loadinfo->ispace; /* From this, we can get the offset to the list of relocation entries */ @@ -348,8 +348,8 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) #ifdef CONFIG_NXFLAT_DUMPBUFFER if (ret == OK && nrelocs > 0) { - relocs = (FAR struct nxflat_reloc_s*)(offset - loadinfo->isize + loadinfo->dspace->region); - nxflat_dumpbuffer("GOT", (FAR const uint8_t*)relocs, nrelocs * sizeof(struct nxflat_reloc_s)); + relocs = (FAR struct nxflat_reloc_s *)(offset - loadinfo->isize + loadinfo->dspace->region); + nxflat_dumpbuffer("GOT", (FAR const uint8_t *)relocs, nrelocs * sizeof(struct nxflat_reloc_s)); } #endif @@ -397,7 +397,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, /* The NXFLAT header is the first thing at the beginning of the ISpace. */ - hdr = (FAR struct nxflat_hdr_s*)loadinfo->ispace; + hdr = (FAR struct nxflat_hdr_s *)loadinfo->ispace; /* From this, we can get the offset to the list of symbols imported by * this module and the number of symbols imported by this module. @@ -440,7 +440,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, DEBUGASSERT(offset >= loadinfo->isize && offset < loadinfo->isize + loadinfo->dsize); - imports = (struct nxflat_import_s*) + imports = (FAR struct nxflat_import_s *) (offset - loadinfo->isize + loadinfo->dspace->region); /* Now, traverse the list of imported symbols and attempt to bind @@ -462,7 +462,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, offset = imports[i].i_funcname; DEBUGASSERT(offset < loadinfo->isize); - symname = (char*)(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s)); + symname = (FAR char *)(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s)); /* Find the exported symbol value for this this symbol name. */ @@ -494,7 +494,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, #ifdef CONFIG_NXFLAT_DUMPBUFFER if (nimports > 0) { - nxflat_dumpbuffer("Imports", (FAR const uint8_t*)imports, nimports * sizeof(struct nxflat_import_s)); + nxflat_dumpbuffer("Imports", (FAR const uint8_t *)imports, nimports * sizeof(struct nxflat_import_s)); } #endif @@ -549,7 +549,7 @@ static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) /* Zero the BSS area */ - memset((void*)(loadinfo->dspace->region + loadinfo->datasize), 0, + memset((FAR void *)(loadinfo->dspace->region + loadinfo->datasize), 0, loadinfo->bsssize); /* Restore the original address environment */ diff --git a/binfmt/libnxflat/libnxflat_init.c b/binfmt/libnxflat/libnxflat_init.c index 2057a18358..52159c5f03 100644 --- a/binfmt/libnxflat/libnxflat_init.c +++ b/binfmt/libnxflat/libnxflat_init.c @@ -118,14 +118,15 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) /* Read the NXFLAT header from offset 0 */ - ret = nxflat_read(loadinfo, (char*)&loadinfo->header, + ret = nxflat_read(loadinfo, (FAR char *)&loadinfo->header, sizeof(struct nxflat_hdr_s), 0); if (ret < 0) { bdbg("Failed to read NXFLAT header: %d\n", ret); return ret; } - nxflat_dumpbuffer("NXFLAT header", (FAR const uint8_t*)&loadinfo->header, + + nxflat_dumpbuffer("NXFLAT header", (FAR const uint8_t *)&loadinfo->header, sizeof(struct nxflat_hdr_s)); /* Verify the NXFLAT header */ diff --git a/binfmt/libnxflat/libnxflat_load.c b/binfmt/libnxflat/libnxflat_load.c index 663953ea27..a3e49d3ce1 100644 --- a/binfmt/libnxflat/libnxflat_load.c +++ b/binfmt/libnxflat/libnxflat_load.c @@ -147,7 +147,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) */ loadinfo->ispace = (uint32_t)mmap(NULL, loadinfo->isize, PROT_READ, - MAP_SHARED|MAP_FILE, loadinfo->filfd, 0); + MAP_SHARED | MAP_FILE, loadinfo->filfd, 0); if (loadinfo->ispace == (uint32_t)MAP_FAILED) { bdbg("Failed to map NXFLAT ISpace: %d\n", errno); @@ -189,7 +189,8 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) * DSpace memory. */ - ret = nxflat_read(loadinfo, (char*)loadinfo->dspace->region, dreadsize, doffset); + ret = nxflat_read(loadinfo, (FAR char *)loadinfo->dspace->region, + dreadsize, doffset); if (ret < 0) { bdbg("Failed to read .data section: %d\n", ret); diff --git a/binfmt/libnxflat/libnxflat_read.c b/binfmt/libnxflat/libnxflat_read.c index 3257945bed..023b7c07e4 100644 --- a/binfmt/libnxflat/libnxflat_read.c +++ b/binfmt/libnxflat/libnxflat_read.c @@ -69,9 +69,9 @@ ****************************************************************************/ #if defined(NXFLAT_DUMP_READDATA) -static inline void nxflat_dumpreaddata(char *buffer, int buflen) +static inline void nxflat_dumpreaddata(FAR char *buffer, int buflen) { - uint32_t *buf32 = (uint32_t*)buffer; + FAR uint32_t *buf32 = (FAR uint32_t *)buffer; int i; int j; diff --git a/binfmt/libnxflat/libnxflat_unload.c b/binfmt/libnxflat/libnxflat_unload.c index 08b1f44f35..7cca6f25f3 100644 --- a/binfmt/libnxflat/libnxflat_unload.c +++ b/binfmt/libnxflat/libnxflat_unload.c @@ -79,14 +79,14 @@ * ****************************************************************************/ -int nxflat_unload(struct nxflat_loadinfo_s *loadinfo) +int nxflat_unload(FAR struct nxflat_loadinfo_s *loadinfo) { /* Release the memory segments */ /* Release the I-Space mmap'ed file */ if (loadinfo->ispace) { - munmap((void*)loadinfo->ispace, loadinfo->isize); + munmap((FAR void *)loadinfo->ispace, loadinfo->isize); loadinfo->ispace = 0; } diff --git a/binfmt/nxflat.c b/binfmt/nxflat.c index f308de73b0..1c4b454ff9 100644 --- a/binfmt/nxflat.c +++ b/binfmt/nxflat.c @@ -187,7 +187,7 @@ static int nxflat_loadbinary(struct binary_s *binp) */ binp->entrypt = (main_t)(loadinfo.ispace + loadinfo.entryoffs); - binp->mapped = (void*)loadinfo.ispace; + binp->mapped = (FAR void *)loadinfo.ispace; binp->mapsize = loadinfo.isize; binp->stacksize = loadinfo.stacksize; @@ -202,7 +202,7 @@ static int nxflat_loadbinary(struct binary_s *binp) #ifdef CONFIG_ARCH_ADDRENV # warning "REVISIT" #else - binp->alloc[0] = (void*)loadinfo.dspace; + binp->alloc[0] = (FAR void *)loadinfo.dspace; #endif #ifdef CONFIG_ARCH_ADDRENV @@ -213,7 +213,7 @@ static int nxflat_loadbinary(struct binary_s *binp) up_addrenv_clone(&loadinfo.addrenv, &binp->addrenv); #endif - nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, + nxflat_dumpbuffer("Entry code", (FAR const uint8_t *)binp->entrypt, MIN(loadinfo.isize - loadinfo.entryoffs, 512)); nxflat_uninit(&loadinfo); diff --git a/binfmt/pcode.c b/binfmt/pcode.c index a4423c6900..6023622440 100644 --- a/binfmt/pcode.c +++ b/binfmt/pcode.c @@ -352,7 +352,7 @@ static int pcode_load(struct binary_s *binp) { /* Set up for the next gulp */ - DEBUGASSERT(nread > 0 && nread <=remaining); + DEBUGASSERT(nread > 0 && nread <= remaining); remaining -= nread; ptr += nread; } diff --git a/binfmt/symtab_findorderedbyvalue.c b/binfmt/symtab_findorderedbyvalue.c index 7b2c76e748..ba731be965 100644 --- a/binfmt/symtab_findorderedbyvalue.c +++ b/binfmt/symtab_findorderedbyvalue.c @@ -100,7 +100,7 @@ symtab_findorderedbyvalue(FAR const struct symtab_s *symtab, */ mid = (low + high) >> 1; - if ( value < symtab[mid].sym_value) + if (value < symtab[mid].sym_value) { high = mid - 1; }