[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 22/28] ddb/db_expr.c (db_add_expr): remove unnecessary variab
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 22/28] ddb/db_expr.c (db_add_expr): remove unnecessary variable |
Date: |
Mon, 9 Dec 2013 00:55:57 +0900 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Marin Ramesa, le Sun 08 Dec 2013 12:40:24 +0100, a écrit :
> Value db_tok_string[0] can be used instead of c.
Ditto.
> * ddb/db_expr.c (db_add_expr): Remove unnecessary variable.
>
> ---
> ddb/db_expr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/ddb/db_expr.c b/ddb/db_expr.c
> index bd68f92..a74cdec 100644
> --- a/ddb/db_expr.c
> +++ b/ddb/db_expr.c
> @@ -226,16 +226,14 @@ db_add_expr(valuep)
> {
> db_expr_t lhs, rhs;
> int t;
> - char c;
>
> if (!db_mult_expr(&lhs))
> return (FALSE);
>
> t = db_read_token();
> while (t == tPLUS || t == tMINUS || t == tBIT_OR) {
> - c = db_tok_string[0];
> if (!db_mult_expr(&rhs)) {
> - db_printf("Expression syntax error after '%c'\n", c);
> + db_printf("Expression syntax error after '%c'\n",
> db_tok_string[0]);
> db_error(0);
> /*NOTREACHED*/
> }
> --
> 1.8.1.4
>
>
--
Samuel
if (argc > 1 && strcmp(argv[1], "-advice") == 0) {
printf("Don't Panic!\n");
exit(42);
}
-- Arnold Robbins in the LJ of February '95, describing RCS
- [PATCH 15/28] ddb/db_command.c: use boolean values, (continued)
- [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
- [PATCH 17/28] ddb/db_command.c (db_command): remove forward declaration, Marin Ramesa, 2013/12/08
- [PATCH 18/28] ddb/db_command.c (db_command_list): remove forward declaration, Marin Ramesa, 2013/12/08
- [PATCH 19/28] ddb/db_examine.c (db_examine_cmd): remove forward declaration, Marin Ramesa, 2013/12/08
- [PATCH 20/28] ddb/db_examine.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/08
- [PATCH 21/28] ddb/db_expr.c (db_mult_expr): remove unnecessary variable, Marin Ramesa, 2013/12/08
- [PATCH 22/28] ddb/db_expr.c (db_add_expr): remove unnecessary variable, Marin Ramesa, 2013/12/08
- Re: [PATCH 22/28] ddb/db_expr.c (db_add_expr): remove unnecessary variable,
Samuel Thibault <=
- [PATCH 23/28] ddb/db_mp.c: use boolean instead of an int, Marin Ramesa, 2013/12/08
- [PATCH 24/28] ddb/db_mp.c (remote_db): comment the call to cpu_interrupt_to_db(), Marin Ramesa, 2013/12/08
- [PATCH 25/28] ddb/db_mp.c: definition of db_console() only if CONSOLE_ON_MASTER, Marin Ramesa, 2013/12/08
- [PATCH 26/28] ddb/db_print.c: use unsigned long instead of an unsigned int, Marin Ramesa, 2013/12/08
- [PATCH 27/28] Use db_addr_t instead of db_expr_t, Marin Ramesa, 2013/12/08
- [PATCH 28/28] ddb/db_trap.c (db_task_trap): remove forward declarations, Marin Ramesa, 2013/12/08
- Re: [PATCH 01/28] chips/busses.h: use boolean instead of a char, Samuel Thibault, 2013/12/08