> On 5 Nov 2019, at 13:55, Martin Pieuchot <m...@openbsd.org> wrote:
> 
> Take the safe approach of converting `boolean_t' to `int', `TRUE' to `1'
> and `FALSE' to `0'.
> 
> This is to reduce the typedef mess that requires pulling MD/MI headers.
> 
> Per-arch ddb code will follow, ok?
I’m ok with the diff (yay for cleaning that mess), a few trivial nits:

> Index: ddb/db_command.c
> @@ -199,15 +199,14 @@ db_command(struct db_command **last_cmdp
>       int             t;
>       char            modif[TOK_STRING_SIZE];
>       db_expr_t       addr, count;
> -     boolean_t       have_addr = FALSE;
> -     int             result;
> +     int             result, have_addr = 0;

You could merge this with the ‘int t’ a few lines above.

> Index: ddb/db_examine.c
> @@ -145,7 +145,7 @@ db_examine(db_addr_t addr, char *fmt, in
>                                       for (i = 0; i < size; i++) {
>                                               value =
>                                                   db_get_value(addr+bytes, 1,
> -                                                     FALSE);
> +                                                     0);
This and the next ones can now go on the same line as db_get_value(), no?

>                                               db_printf("%02lx",
>                                                   (long)value);
>                                               bytes++;
> @@ -159,7 +159,7 @@ db_examine(db_addr_t addr, char *fmt, in
>                               /* Print chars, use . for non-printables */
>                               while (bytes--) {
>                                       value = db_get_value(addr + incr, 1,
> -                                         FALSE);
> +                                         0);
Idem.

> @@ -198,7 +198,7 @@ db_examine(db_addr_t addr, char *fmt, in
>                               incr = 0;
>                               for (;;) {
>                                       value = db_get_value(addr + incr, 1,
> -                                         FALSE);
> +                                         0);
Idem.

Cheers,
Jasper

Reply via email to