On 02.12.2013 09:14:36, Marin Ramesa wrote:
> * kern/lock.h (decl_simple_lock_data): Define macro.
> (simple_unlock): Define so that lock is assigned to itself and add a
> comment saying why this was done.
> (simple_lock_try): Define so that lock data is cast to a boolean with
> the value TRUE and
On 09.12.2013 06:40:25, Samuel Thibault wrote:
> Marin Ramesa, le Sun 08 Dec 2013 17:38:10 +0100, a écrit :
> > On 08.12.2013 16:46:20, Samuel Thibault wrote:
> > > Marin Ramesa, le Sun 08 Dec 2013 12:40:08 +0100, a écrit :
> > > > Remove assignments without any effect and unnecessary
> > > > vari
On 08.12.2013 15:25:42, Samuel Thibault wrote:
> Marin Ramesa, le Mon 02 Dec 2013 22:54:39 +0100, a écrit :
> > -for ( ; (c != K_DONE) && (char_idx <= max);
> > +for ( ; ((char)c != K_DONE) && (char_idx <= max);
>
> I have rather made K_DONE an unsigned, simply. It definitely has to
> be an unsig
Marin Ramesa, le Sun 08 Dec 2013 17:38:10 +0100, a écrit :
> On 08.12.2013 16:46:20, Samuel Thibault wrote:
> > Marin Ramesa, le Sun 08 Dec 2013 12:40:08 +0100, a écrit :
> > > Remove assignments without any effect and unnecessary variables.
> >
> > Err, *ptep0 assignment does have an effect, what
On 08.12.2013 16:49:36, Samuel Thibault wrote:
> Marin Ramesa, le Sun 08 Dec 2013 12:40:11 +0100, a écrit :
> > First loop iteration ensures that the value is non-zero. Second
> loop iteration likewise. Therefore name[1] is always non-zero if the
> loop is executed.
>
> Uh? It seems wrong to me
On 08.12.2013 16:46:20, Samuel Thibault wrote:
> Marin Ramesa, le Sun 08 Dec 2013 12:40:08 +0100, a écrit :
> > Remove assignments without any effect and unnecessary variables.
>
> Err, *ptep0 assignment does have an effect, what makes you think
> otherwise?
I don't see it. Maybe it's the call to
Marin Ramesa, le Sun 08 Dec 2013 16:00:29 +0100, a écrit :
> On 08.12.2013 15:28:06, Samuel Thibault wrote:
> > Marin Ramesa, le Mon 02 Dec 2013 22:54:41 +0100, a écrit :
> > > * ddb/db_cond.c (db_cond): Move struct definition to ddb/db_cond.h.
> >
> > Why? It's not used anywhere else.
>
> I jus
Marin Ramesa, le Sun 08 Dec 2013 12:40:26 +0100, a écrit :
> This wasn't noticed before since the number of cpus is always one I guess, but
> cpu_interrupt_to_db() is without definition. Comment the call.
Well, I prefer the issue to be noticed at compilation and thus spotted
immediately rather tha
Marin Ramesa, le Sun 08 Dec 2013 12:40:23 +0100, a écrit :
> Value db_tok_string[0] can be used instead of c.
Ditto.
> * ddb/db_expr.c (db_mult_expr): Remove unnecessary variable.
>
> ---
> ddb/db_expr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/ddb/db_expr.c
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
Marin Ramesa, le Sun 08 Dec 2013 12:40:18 +0100, a écrit :
> In this way there are two casts less.
Yes, but
> - addr = (db_expr_t)db_next;
This kind of cast is preferrable to
> + if (db_expression((db_expr_t *)&addr)) {
that one, because whatever the actual sizes, the firs
Marin Ramesa, le Sun 08 Dec 2013 12:40:11 +0100, a écrit :
> First loop iteration ensures that the value is non-zero. Second loop iteration
> likewise. Therefore name[1] is always non-zero if the loop is executed.
Uh? It seems wrong to me. Please show a precise variable evolution shart.
> * ddb
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_aou
Marin Ramesa, le Sun 08 Dec 2013 12:40:09 +0100, a écrit :
> Member n_strx can be used instead of strx.
But that's less readable. A variable here is really not a problem, the
compiler will most probably put it in a register anyway.
> * ddb/db_aout.c (aout_db_sym_init): Remove unnecessary variabl
Marin Ramesa, le Sun 08 Dec 2013 12:40:08 +0100, a écrit :
> Remove assignments without any effect and unnecessary variables.
Err, *ptep0 assignment does have an effect, what makes you think
otherwise?
> * i386/i386/db_interface.c (db_write_bytes) (oldmap0, addr1, ptep1, oldmap1):
> Remove varia
Marin Ramesa, le Sun 08 Dec 2013 12:40:04 +0100, a écrit :
> Field bus_master_init is initialized to zero
Well, that's just because it's not used ATM. It could be.
> and therefore
> configure_bus_master() always returns FALSE without any
> effect on bus_master_init. The for loops in configure_bu
Marin Ramesa, le Sun 08 Dec 2013 12:40:03 +0100, a écrit :
> A struct member which tracks if the device has been probed. It should
> really be a boolean instead of a char.
I'd rather not, since it changes its size.
> * chips/busses.c (alive): Use boolean values.
> * chips/busses.h (alive): Use bo
Marin Ramesa, le Fri 06 Dec 2013 16:29:59 +0100, a écrit :
> * i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Modify argument
> type.
> memcpy() has a pointer to void as a second argument so it's all the same.
> * i386/i386at/kd_event.h (X_kdb_enter_init, X_kdb_exit_init): Modify argu
Marin Ramesa, le Fri 06 Dec 2013 16:29:55 +0100, a écrit :
> This include fixes the implicit declaration of function. But I don't know if
> it is correct to include here stuff from i386at.
Ditto.
> * kern/machine.c: Include i386at/model_dep.h.
>
> ---
> kern/machine.c | 2 +-
> 1 file changed,
Marin Ramesa, le Fri 06 Dec 2013 16:29:54 +0100, a écrit :
> This include fixes the implicit declaration of function. But I don't know
> if it is correct to include here stuff from i386at.
It is not, one can use instead.
> * kern/debug.c: Include i386at/model_dep.h.
>
> ---
> kern/debug.c | 2
Marin Ramesa, le Fri 06 Dec 2013 16:29:53 +0100, a écrit :
> * kern/exception.c (mach_exception): Move struct definition to
> kern/exception.h.
Ditto.
> ---
> kern/exception.c | 14 --
> kern/exception.h | 14 ++
> 2 files changed, 14 insertions(+), 14 deletions(-)
>
>
Marin Ramesa, le Fri 06 Dec 2013 16:29:50 +0100, a écrit :
> * kern/boot_script.c (sym, arg): Move struct definitions to
> kern/boot_script.h.
Ditto.
> ---
> kern/boot_script.c | 41 -
> kern/boot_script.h | 39 +++
> 2
Marin Ramesa, le Fri 06 Dec 2013 16:29:51 +0100, a écrit :
> * kern/bootstrap.c: Include kern/bootstrap.h.
> (user_bootstrap_info): Move struct definition to kern/bootstrap.h.
Ditto.
> ---
> kern/bootstrap.c | 10 +-
> kern/bootstrap.h | 8
> 2 files changed, 9 insertions(+), 9
Marin Ramesa, le Thu 05 Dec 2013 22:04:00 +0100, a écrit :
> This code is used even if KERNEL is not defined. Remove
> the ifdef.
Ditto.
> * kern/processor.h [KERNEL]: Remove ifdef.
>
> ---
> kern/processor.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kern/processor.h b/kern/pro
Marin Ramesa, le Thu 05 Dec 2013 22:03:48 +0100, a écrit :
> * kern/debug.c (__stack_chk_guard): Remove unused variable.
Actually it is used by the gcc compiler.
> ---
> kern/debug.c | 7 ---
> 1 file changed, 7 deletions(-)
>
> diff --git a/kern/debug.c b/kern/debug.c
> index 8cd3f02..d3ae
Marin Ramesa, le Thu 05 Dec 2013 22:03:47 +0100, a écrit :
> Variable that keeps the panic string. Initialize to NULL, meaning
> that the initial condition is that there is no panic string.
Again, that's already initialized to 0.
> * kern/debug.c (panicstr): Initialize to NULL.
>
> ---
> kern/d
Marin Ramesa, le Thu 05 Dec 2013 22:03:46 +0100, a écrit :
> * kern/debug.c (Assert_print_lock): Initialize the lock.
It is actually initialized to zero, which happens to be the correct
value.
> @@ -58,6 +58,7 @@ void
> Assert(char *exp, char *file, int line)
> {
> #if NCPUS > 1
> + simple
Marin Ramesa, le Thu 05 Dec 2013 22:03:44 +0100, a écrit :
> * kern/act.c (null_act): Comment unused variable.
Well, it is used, by being initialized. The comment above explains what
it's used for.
> * kern/act.h (null_act): Likewise.
>
> ---
> kern/act.c | 2 +-
> kern/act.h | 2 +-
> 2 files
Marin Ramesa, le Thu 05 Dec 2013 22:03:36 +0100, a écrit :
> Variable lpr_alive is never initialized.
Again, it is, like all statically-allocated variables, to zero.
> I suggest a removal of
> the code that deals with this variable.
>
> But, on the other hand, maybe the variable should be initia
Marin Ramesa, le Thu 05 Dec 2013 22:03:35 +0100, a écrit :
> Variable kb_mode is used even if KERNEL is not defined.
> Remove ifdef.
Ditto.
> * i386/i386at/kd.h [KERNEL]: Remove ifdef.
>
> ---
> i386/i386at/kd.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/i386/i386at/kd.h b/i386/
Marin Ramesa, le Thu 05 Dec 2013 22:03:34 +0100, a écrit :
> Variable key_map is used even if KERNEL is not defined. Remove
> ifdef.
Ditto.
> * i386/i386at/kd.h [KERNEL]: Remove ifdef.
>
> ---
> i386/i386at/kd.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/i386/i386at/kd.h b/i386/
Marin Ramesa, le Thu 05 Dec 2013 22:03:31 +0100, a écrit :
> Variable font_byte_width is always zero. Use this to simplify
> the code.
Ditto.
> * i386/i386at/kd.c (font_byte_width): Remove variable.
> (i, from): Remove variables.
> Remove for loop.
> * i386/i386at/kdsoft.h (font_byte_width): Remo
Marin Ramesa, le Thu 05 Dec 2013 22:03:30 +0100, a écrit :
> Variable fb_byte_width is always zero. Use this to simplify
> the code.
Ditto.
> * i386/i386at/kd.c (fb_byte_width): Remove variable.
> (to): Remove variable.
> (bit2fbptr): Remove assignment.
> (to): Likewise.
> (to, fp, i): Remove var
Marin Ramesa, le Sun 08 Dec 2013 16:04:32 +0100, a écrit :
> On 08.12.2013 15:46:00, Samuel Thibault wrote:
> > Marin Ramesa, le Thu 05 Dec 2013 22:02:57 +0100, a écrit :
> > > This code is used even if KERNEL is not defined.
> >
> > Where? KERNEL is always defined for the kernel build. It is no
Marin Ramesa, le Thu 05 Dec 2013 22:03:29 +0100, a écrit :
> Variable char_byte_width is always zero. Use this to simplify
> the code.
Well, it should actually always be one. There is probably some other bug
to fix here.
> * i386/i386at/kd.c (char_byte_width): Remove variable.
> (j): Remove varia
On 08.12.2013 15:46:00, Samuel Thibault wrote:
> Marin Ramesa, le Thu 05 Dec 2013 22:02:57 +0100, a écrit :
> > This code is used even if KERNEL is not defined.
>
> Where? KERNEL is always defined for the kernel build. It is not
> defined only in userland, which doesn't have access to these arra
Marin Ramesa, le Thu 05 Dec 2013 22:03:26 +0100, a écrit :
> * i386/i386at/com.c (comtimer_state): Remove variable.
> (comtimer_state): Remove dead assignment.
Now still used.
> ---
> i386/i386at/com.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/i386/i386at/com.c b/i386/i386at/com
Marin Ramesa, le Thu 05 Dec 2013 22:03:25 +0100, a écrit :
> Variable comtimer_active is used uninitialized. What's the
> chance of this variable getting the value FALSE?
> @@ -64,7 +64,6 @@ struct tty com_tty[NCOM];
> int commodem[NCOM];
> int comcarrier[NCOM] = {0, 0,};
> boolean_t comfifo[NC
On 08.12.2013 15:28:06, Samuel Thibault wrote:
> Marin Ramesa, le Mon 02 Dec 2013 22:54:41 +0100, a écrit :
> > * ddb/db_cond.c (db_cond): Move struct definition to ddb/db_cond.h.
>
> Why? It's not used anywhere else.
I just tought it looks better this way. Guess I'm not used to seeing
struct d
On 08.12.2013 15:27:12, Samuel Thibault wrote:
> Marin Ramesa, le Mon 02 Dec 2013 22:54:40 +0100, a écrit :
> > * i386/i386at/kd.c [old]: Remove code.
>
> Unless you are sure the code should go away, don't remove it.
> Actually it seems "old" code is the proper one, and the other code is
> a wor
Marin Ramesa, le Thu 05 Dec 2013 22:03:19 +0100, a écrit :
> * i386/i386/mp_desc.c (mp_desc_table): Remove variable.
> (mp_desc_table): Remove dead assignment.
> * i386/i386/mp_desc.h (mp_desc_table): Remove declaration.
Probably useful for debugging too.
> ---
> i386/i386/mp_desc.c | 6 --
>
Marin Ramesa, le Thu 05 Dec 2013 22:03:16 +0100, a écrit :
> * i386/i386/db_interface.c (i386_last_kdb_sp): Remove variable.
> (i386_last_kdb_sp): Remove dead assignment.
Ditto.
> ---
> i386/i386/db_interface.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/i386/i386/db_interface.c
Marin Ramesa, le Thu 05 Dec 2013 22:03:15 +0100, a écrit :
> * i386/i386/db_interface.c (i386_nested_saved_state): Remove variable.
> (i386_nested_saved_state): Remove dead assignment.
Ditto.
> ---
> i386/i386/db_interface.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/i386/i386/db
Marin Ramesa, le Thu 05 Dec 2013 22:03:14 +0100, a écrit :
> * i386/i386/db_interface.c (i386_last_saved_statep): Remove variable.
> (i386_last_saved_statep): Remove dead assignment.
This looks like a debugging helper, to be kept.
> ---
> i386/i386/db_interface.c | 2 --
> 1 file changed, 2 dele
Marin Ramesa, le Thu 05 Dec 2013 22:03:09 +0100, a écrit :
> Function ether_sprintf() is used even if KERNEL is not defined.
> Avoid implicit declaration in that case by removing the ifdef.
Ditto.
> * device/if_ether.h [KERNEL]: Remove ifdef.
>
> ---
> device/if_ether.h | 2 --
> 1 file changed
Marin Ramesa, le Thu 05 Dec 2013 22:03:06 +0100, a écrit :
> Field constab is used even if KERNEL is not defined.
> Remove the ifdef.
Ditto.
> * device/cons.h [KERNEL]: Remove ifdef.
>
> ---
> device/cons.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/device/cons.h b/device/cons.
Marin Ramesa, le Thu 05 Dec 2013 22:03:03 +0100, a écrit :
> Function block_io_mmap() is never a dev op, therefore it is
> unused and it can be written again easily if needed.
> - if (device->dev_ops->d_mmap == block_io_mmap) {
> - d->type = DEV_PAGER_TYPE;
> - } else {
> -
Marin Ramesa, le Thu 05 Dec 2013 22:02:57 +0100, a écrit :
> This code is used even if KERNEL is not defined.
Where? KERNEL is always defined for the kernel build. It is not
defined only in userland, which doesn't have access to these arrays and
functions.
> Remove the ifdef.
>
> * chips/busse
Marin Ramesa, le Mon 02 Dec 2013 22:54:50 +0100, a écrit :
> * vm/memory_object_proxy.c (memory_object_proxy): Move struct definition to
> vm/memory_object_proxy.h.
Ditto.
> ---
> vm/memory_object_proxy.c | 10 --
> vm/memory_object_proxy.h | 9 +
> 2 files changed, 9 insertion
Marin Ramesa, le Mon 02 Dec 2013 22:54:51 +0100, a écrit :
> * vm/vm_fault.c (vm_fault_state): Move struct definition to vm/vm_fault.h.
Ditto.
> ---
> vm/vm_fault.c | 26 --
> vm/vm_fault.h | 24
> 2 files changed, 24 insertions(+), 26 deletions(-
Marin Ramesa, le Mon 02 Dec 2013 22:54:52 +0100, a écrit :
> * vm/vm_resident.c: Include vm/vm_resident.h.
> (vm_page_bucket_t): Move struct defintion to vm/vm_resident.h.
Ditto.
> ---
> vm/vm_resident.c | 5 +
> vm/vm_resident.h | 5 +
> 2 files changed, 6 insertions(+), 4 deletions(-)
Marin Ramesa, le Mon 02 Dec 2013 22:54:48 +0100, a écrit :
> * kern/act.c (GetSetState): Move struct definition to kern/act.h.
Ditto.
> ---
> kern/act.c | 8
> kern/act.h | 7 +++
> 2 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/kern/act.c b/kern/act.c
> index 32
Marin Ramesa, le Mon 02 Dec 2013 22:54:46 +0100, a écrit :
> * ipc/ipc_marequest.c (ipc_marequest_bucket): Move struct definition to
> ipc/ipc_marequest.h.
> * ipc/ipc_marequest.h: Include kern/lock.h.
Ditto.
> ---
> ipc/ipc_marequest.c | 7 ---
> ipc/ipc_marequest.h | 8
> 2 file
Marin Ramesa, le Mon 02 Dec 2013 22:54:49 +0100, a écrit :
> * kern/lock.c [MACH_SLOCKS && NCPUS == 1] (simple_locks_info): Move struct
> definition to kern/lock.h.
Ditto.
> ---
> kern/lock.c | 5 -
> kern/lock.h | 7 +++
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --gi
Marin Ramesa, le Mon 02 Dec 2013 22:54:44 +0100, a écrit :
> * i386/intel/pmap.c (pv_entry, pmap_update_item, pmap_update_list): Move
> struct definitions to i386/intel/pmap.h.
Ditto.
> ---
> i386/intel/pmap.c | 45 -
> i386/intel/pmap.h | 46
Marin Ramesa, le Mon 02 Dec 2013 22:54:45 +0100, a écrit :
> * ipc/ipc_hash.c (ipc_hash_global_bucket): Move struct definition to
> ipc/ipc_hash.h.
Ditto.
> ---
> ipc/ipc_hash.c | 7 ---
> ipc/ipc_hash.h | 7 +++
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/ipc/i
Marin Ramesa, le Mon 02 Dec 2013 22:54:43 +0100, a écrit :
> * i386/i386/idt.c (idt_init_entry): Move struct definition to
> i386/i386/idt-gen.h.
Ditto.
> ---
> i386/i386/idt-gen.h | 7 +++
> i386/i386/idt.c | 6 --
> 2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git
Marin Ramesa, le Mon 02 Dec 2013 22:54:42 +0100, a écrit :
> * ddb/db_macro.c (db_user_macro): Move struct definition to ddb/db_macro.h.
Ditto.
> ---
> ddb/db_macro.c | 6 --
> ddb/db_macro.h | 8
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/ddb/db_macro.c b/
Marin Ramesa, le Mon 02 Dec 2013 22:54:41 +0100, a écrit :
> * ddb/db_cond.c (db_cond): Move struct definition to ddb/db_cond.h.
Why? It's not used anywhere else.
> ---
> ddb/db_cond.c | 7 ---
> ddb/db_cond.h | 7 +++
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a
Marin Ramesa, le Mon 02 Dec 2013 22:54:40 +0100, a écrit :
> * i386/i386at/kd.c [old]: Remove code.
Unless you are sure the code should go away, don't remove it. Actually
it seems "old" code is the proper one, and the other code is a
workaround for some bogus hardware, which we may want to just d
Marin Ramesa, le Mon 02 Dec 2013 22:54:39 +0100, a écrit :
> - for ( ; (c != K_DONE) && (char_idx <= max);
> + for ( ; ((char)c != K_DONE) && (char_idx <= max);
I have rather made K_DONE an unsigned, simply. It definitely has to be
an unsigned anyway, since
In this way everything falls into place and there is one cast less.
Function db_task_printsym() is already always called with the cast to
db_addr_t in the first argument.
* ddb/db_aout.c (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t.
(aout_db_search_by_addr): Don't cast to vm_offset_
* ddb/db_break.h (db_check_breakpoint_valid): Add prototype.
* ddb/db_trap.c (db_init_default_thread, db_check_breakpoint_valid): Remove
forward declarations.
---
ddb/db_break.h | 2 ++
ddb/db_trap.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ddb/db_break.h b/ddb/db_
Value db_tok_string[0] can be used instead of c.
* ddb/db_expr.c (db_mult_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 eee9e4f..bd68f92 100644
--- a/ddb/db_expr.c
+++ b/ddb/db_expr
* ddb/db_examine.c: Trivial stylistic fix for consistency.
---
ddb/db_examine.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ddb/db_examine.c b/ddb/db_examine.c
index d8ee9bf..4b76d33 100644
--- a/ddb/db_examine.c
+++ b/ddb/db_examine.c
@@ -78,7 +78,7 @@ db_examine_cm
Variable db_maxoff is in other files declared as unsigned long.
* ddb/db_print.c (db_maxoff): Use unsigned long instead of an unsigned int.
---
ddb/db_print.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ddb/db_print.c b/ddb/db_print.c
index 75c914e..fbc0960 100644
--- a/d
Value db_tok_string[0] can be used instead of c.
* 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.
This wasn't noticed before since the number of cpus is always one I guess, but
cpu_interrupt_to_db() is without definition. Comment the call.
* ddb/db_mp.c (cpu_interrupt_to_db): Comment the call.
---
ddb/db_mp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ddb/db_mp.c b/d
First loop iteration ensures that the value is non-zero. Second loop iteration
likewise. Therefore name[1] is always non-zero if the loop is executed.
* ddb/db_aout.c (aout_db_is_filename): Remove unnecessary check.
---
ddb/db_aout.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
d
* ddb/db_break.c (db_add_thread_breakpoint): Fix argument list.
---
ddb/db_break.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ddb/db_break.c b/ddb/db_break.c
index 0491be7..b3f13c6 100644
--- a/ddb/db_break.c
+++ b/ddb/db_break.c
@@ -92,6 +92,7 @@ static int
db_add_thread_breakpoint(bkp
Function db_console() is called only if CONSOLE_ON_MASTER.
If it stays this way, db_console() will not compile. I don't know
if it should be removed. Maybe someone will rewrite it.
* ddb/db_mp.c (db_console): Definition only if CONSOLE_ON_MASTER.
* ddb/db_mp.h [CONSOLE_ON_MASTER] (db_console): A
* ddb/db_examine.c (db_option): Remove forward declaration.
---
ddb/db_examine.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/ddb/db_examine.c b/ddb/db_examine.c
index 1ceff41..d8ee9bf 100644
--- a/ddb/db_examine.c
+++ b/ddb/db_examine.c
@@ -65,7 +65,6 @@ db_examine_cmd(addr, have_addr, cou
* ddb/db_command.c (db_fncall): Remove forward declaration.
---
ddb/db_command.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/ddb/db_command.c b/ddb/db_command.c
index cb3e4d7..0949f8b 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -177,7 +177,6 @@ db_command(last_cmdp, cmd_table)
* ddb/db_mp.c (db_enter_debug): Use boolean instead of an int.
---
ddb/db_mp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ddb/db_mp.c b/ddb/db_mp.c
index 1785e4d..b99718e 100644
--- a/ddb/db_mp.c
+++ b/ddb/db_mp.c
@@ -53,7 +53,7 @@ int db_active[NCPUS] = { 0 }; /*
* ddb/db_command.c (db_skip_to_eol): Remove forward declaration.
---
ddb/db_command.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/ddb/db_command.c b/ddb/db_command.c
index 0949f8b..eaad192 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -298,8 +298,6 @@ db_command_list(last_cmdp,
Function aout_db_qualified_search() returns db_sym_t. Use DB_SYM_NULL as
return value instead of zero.
* ddb/db_aout.c (aout_db_qualified_search): Use DB_SYM_NULL as return value.
---
ddb/db_aout.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ddb/db_aout.c b/dd
Variable name can be used instead of s2.
* 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_
Variable addr is already of type db_addr_t.
* ddb/db_break.c (db_find_thread_breakpoint_here) (addr): Don't cast to
db_addr_t.
---
ddb/db_break.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ddb/db_break.c b/ddb/db_break.c
index b3f13c6..f94663a 100644
--- a/ddb/db_break.
* ddb/db_command.c (db_cmd_loop_done): Use boolean values.
---
ddb/db_command.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ddb/db_command.c b/ddb/db_command.c
index b2b2a46..e8792d0 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -303,7 +303,7 @@ db_comman
* ddb/db_aout.c (db_sym_parse_and_lookup): Remove forward declaration.
* ddb/db_sym.h (db_sym_parse_and_lookup): Add prototype.
---
ddb/db_aout.c | 2 --
ddb/db_sym.h | 6 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ddb/db_aout.c b/ddb/db_aout.c
index 3a48533..76bc893 1
* i386/i386/db_interface.c (db_write_bytes_user_space): Remove forward
declaration.
* i386/i386/db_interface.h (db_write_bytes_user_space): Add prototype.
---
i386/i386/db_interface.c | 1 -
i386/i386/db_interface.h | 7 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/i386/
Field bus_master_init is initialized to zero and therefore
configure_bus_master() always returns FALSE without any
effect on bus_master_init. The for loops in configure_bus_master()
and probeio() never get executed. I suggest commenting out of
this code.
* chips/busses.c (configure_bus_master): Co
Struct uio is nowhere defined and in device/buf.h the string uio is defined
as io_req. Remove all declarations of uio structure and use io_req_t instead
of it.
* device/buf.h (uio, io_req): Remove definition.
* i386/i386at/kd.c: Remove comment.
(kdread): Use io_req_t.
(kdwrite): Likewise.
* i386/i
In this way there are two casts less.
* ddb/db_command.c (addr): Use db_addr_t as the type.
(addr): Don't cast to db_expr_t.
(db_expression) (addr): Cast to a pointer to db_expr_t.
---
ddb/db_command.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ddb/db_command
Member n_strx can be used instead of strx.
* ddb/db_aout.c (aout_db_sym_init): Remove unnecessary variable.
---
ddb/db_aout.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/ddb/db_aout.c b/ddb/db_aout.c
index 9e1c3d4..5cb3911 100644
--- a/ddb/db_aout.c
+++ b/ddb/d
Check for uninitialized data and print a message if that is the case.
* ddb/db_examine.c (db_xcdump) (data_uninitialized): New variable.
(db_xcdump): Check if data is uninitialized.
(db_xcdump): Print a message if that is the case.
---
ddb/db_examine.c | 16 +++-
1 file changed, 11 i
A struct member which tracks if the device has been probed. It should
really be a boolean instead of a char.
* chips/busses.c (alive): Use boolean values.
* chips/busses.h (alive): Use boolean instead of a char.
* i386/i386at/autoconf.c (bus_device_init): Use boolean values in
initialization.
Remove assignments without any effect and unnecessary variables.
* i386/i386/db_interface.c (db_write_bytes) (oldmap0, addr1, ptep1, oldmap1):
Remove variables.
(db_write_bytes) (oldmap0, ptep0): Remove assignment.
(db_write_bytes) (addr1, ptep1, oldmap1): Remove assignments.
(db_write_bytes) (ol
There is a case when db_read_bytes() returns early without initializing
the data. Mark that case with the return value of -1 and let db_get_task_value()
return -1 if the data has been uninitialized or the array index is out of
bounds.
* ddb/db_access.c (db_get_task_value) (data_uninitialized): New
89 matches
Mail list logo