diff mbox series

[V4,3/4] bsd-user: do not use C99 // comments

Message ID 2d69a2e7-67a2-3660-8ffe-de0962a046af@huawei.com (mailing list archive)
State New, archived
Headers show
Series bsd-user: Fix some code style problems | expand

Commit Message

shiliyang Jan. 18, 2021, 2:20 a.m. UTC
This patch fixes error messages found by checkpatch.pl:
ERROR: do not use C99 // comments

Signed-off-by: Liyang Shi <shiliyang@huawei.com>
---
 bsd-user/elfload.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Warner Losh Jan. 18, 2021, 2:37 a.m. UTC | #1
Same: please submit this via http://github.com/qemu-bsd-user...

Warner

On Sun, Jan 17, 2021, 7:20 PM shiliyang <shiliyang@huawei.com> wrote:

> This patch fixes error messages found by checkpatch.pl:
> ERROR: do not use C99 // comments
>
> Signed-off-by: Liyang Shi <shiliyang@huawei.com>
> ---
>  bsd-user/elfload.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
> index d5cab25607..2842dfe56b 100644
> --- a/bsd-user/elfload.c
> +++ b/bsd-user/elfload.c
> @@ -390,7 +390,7 @@ static const char *lookup_symbolxx(struct syminfo *s,
> target_ulong orig_addr)
>      struct elf_sym *syms = s->disas_symtab.elf64;
>  #endif
>
> -    // binary search
> +    /* binary search */
>      struct elf_sym *sym;
>
>      sym = bsearch(&orig_addr, syms, s->disas_num_syms, sizeof(*syms),
> symfind);
> @@ -465,7 +465,7 @@ found:
>      i = 0;
>      while (i < nsyms) {
>          bswap_sym(syms + i);
> -        // Throw away entries which we do not need.
> +        /* Throw away entries which we do not need. */
>          if (syms[i].st_shndx == SHN_UNDEF ||
>                  syms[i].st_shndx >= SHN_LORESERVE ||
>                  ELF_ST_TYPE(syms[i].st_info) != STT_FUNC) {
> --
> 2.29.1.59.gf9b6481aed
>
>
diff mbox series

Patch

diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index d5cab25607..2842dfe56b 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -390,7 +390,7 @@  static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr)
     struct elf_sym *syms = s->disas_symtab.elf64;
 #endif

-    // binary search
+    /* binary search */
     struct elf_sym *sym;

     sym = bsearch(&orig_addr, syms, s->disas_num_syms, sizeof(*syms), symfind);
@@ -465,7 +465,7 @@  found:
     i = 0;
     while (i < nsyms) {
         bswap_sym(syms + i);
-        // Throw away entries which we do not need.
+        /* Throw away entries which we do not need. */
         if (syms[i].st_shndx == SHN_UNDEF ||
                 syms[i].st_shndx >= SHN_LORESERVE ||
                 ELF_ST_TYPE(syms[i].st_info) != STT_FUNC) {