From 571472f6ac1e63fda8ef49e44b83334ad5431aff Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 11 Nov 2006 01:12:24 +0000 Subject: 2006-11-11 Samuel Thibault Fix ``assignment used as truth value'' warnings. * device/cons.c (cninit): Add parenthesis. * kern/bootstrap.c (copy_bootstrap): Likewise. * kern/printf.c (_doprnt): Likewise. * vm/vm_map.c (vm_map_lookup): Likewise. --- kern/bootstrap.c | 2 +- kern/printf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'kern') diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 0fa4d2d..ad501d6 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -450,7 +450,7 @@ static void copy_bootstrap(void *e, exec_info_t *boot_exec_info) register vm_map_t user_map = current_task()->map; int err; - if (err = exec_load(boot_read, read_exec, e, boot_exec_info)) + if ((err = exec_load(boot_read, read_exec, e, boot_exec_info))) panic("Cannot load user-bootstrap image: error code %d", err); #if MACH_KDB diff --git a/kern/printf.c b/kern/printf.c index 22b0987..74bb6c4 100644 --- a/kern/printf.c +++ b/kern/printf.c @@ -292,7 +292,7 @@ void _doprnt( break; any = FALSE; - while (i = *p++) { + while ((i = *p++)) { /* NOTE: The '32' here is because ascii space */ if (*p <= 32) { /* -- cgit v1.2.3