[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/28] ddb/db_aout.c (aout_db_eq_name): remove unnecessary va
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 08/28] ddb/db_aout.c (aout_db_eq_name): remove unnecessary variable |
Date: |
Mon, 9 Dec 2013 00:47:55 +0900 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Marin Ramesa, le Sun 08 Dec 2013 12:40:10 +0100, a écrit :
> Variable name can be used instead of s2.
Ditto.
> * ddb/db_aout.c (aout_db_eq_name): Remove unnecessary variable.
>
> ---
> ddb/db_aout.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/ddb/db_aout.c b/ddb/db_aout.c
> index 5cb3911..63fa518 100644
> --- a/ddb/db_aout.c
> +++ b/ddb/db_aout.c
> @@ -152,18 +152,17 @@ aout_db_eq_name(sp, name)
> struct nlist *sp;
> char *name;
> {
> - char *s1, *s2;
> + char *s1;
>
> s1 = sp->n_un.n_name;
> - s2 = name;
> - if (*s1 == '_' && *s2 && *s2 != '_')
> + if (*s1 == '_' && *name && *name != '_')
> s1++;
> - while (*s2) {
> - if (*s1++ != *s2++) {
> + while (*name) {
> + if (*s1++ != *name++) {
> /*
> * check .c .o file name comparison case
> */
> - if (*s2 == 0 && sp->n_un.n_name <= s1 - 2
> + if (*name == 0 && sp->n_un.n_name <= s1 - 2
> && s1[-2] == '.' && s1[-1] == 'o')
> return(TRUE);
> return(FALSE);
> --
> 1.8.1.4
>
>
--
Samuel
* D a decide de peter un cable dans son rapport de pfp
<c> et il a bien raison ;-)
<c> tu vas dire quoi ?
<D> j'ai mis les paroles de "le coq est mort" en en-tete
-+- #ens-mim et la peufeupeu -+-
- [PATCH 04/28] ddb/db_examine.c: modify db_xcdump(), (continued)
[PATCH 05/28] i386/i386/db_interface.c: remove forward declaration, Marin Ramesa, 2013/12/08
[PATCH 07/28] ddb/db_aout.c (aout_db_sym_init): remove unnecessary variable, Marin Ramesa, 2013/12/08
[PATCH 08/28] ddb/db_aout.c (aout_db_eq_name): remove unnecessary variable, Marin Ramesa, 2013/12/08
- Re: [PATCH 08/28] ddb/db_aout.c (aout_db_eq_name): remove unnecessary variable,
Samuel Thibault <=
[PATCH 09/28] ddb/db_aout.c (aout_db_is_filename): remove unnecessary check, Marin Ramesa, 2013/12/08
[PATCH 10/28] ddb/db_aout.c (aout_db_qualified_search): use DB_SYM_NULL as return value, Marin Ramesa, 2013/12/08
[PATCH 11/28] ddb/db_aout.c (aout_db_lookup): remove forward declaration, Marin Ramesa, 2013/12/08
[PATCH 12/28] ddb/db_break.c (db_add_thread_breakpoint): fix argument list, Marin Ramesa, 2013/12/08
[PATCH 13/28] ddb/db_break.c (db_find_thread_breakpoint_here): remove unnecessary cast, Marin Ramesa, 2013/12/08
[PATCH 14/28] i386/i386at/kd.c: use io_req instead of uio, Marin Ramesa, 2013/12/08
[PATCH 15/28] ddb/db_command.c: use boolean values, Marin Ramesa, 2013/12/08
[PATCH 16/28] ddb/db_command.c (db_command): use db_addr_t instead of db_expr_t, Marin Ramesa, 2013/12/08