* Fixed warnings, mostly due to NULL changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24487 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-03-20 11:04:45 +00:00
parent a7b7eb1ea5
commit 4495cd43c1
6 changed files with 18 additions and 13 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2006, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
@ -225,6 +225,12 @@ pic_init(void)
// determine which interrupts are level or edge triggered
#if 0
// should set everything possible to level triggered
out8(PIC_MASTER_TRIGGER_MODE, 0xf8);
out8(PIC_SLAVE_TRIGGER_MODE, 0xde);
#endif
sLevelTriggeredInterrupts = in8(PIC_MASTER_TRIGGER_MODE)
| (in8(PIC_SLAVE_TRIGGER_MODE) << 8);
@ -453,7 +459,7 @@ page_fault_exception(struct iframe* frame)
if (kernelDebugger) {
// if this thread has a fault handler, we're allowed to be here
if (thread && thread->fault_handler != NULL) {
if (thread && thread->fault_handler != 0) {
frame->eip = thread->fault_handler;
return;
}

View File

@ -353,7 +353,7 @@ arch_thread_context_switch(struct thread *from, struct thread *to)
// set TLS GDT entry to the current thread - since this action is
// dependent on the current CPU, we have to do it here
if (to->user_local_storage != NULL)
if (to->user_local_storage != 0)
set_tls_context(to);
newPageDirectory = (addr_t)x86_next_page_directory(from, to);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@ -381,7 +381,7 @@ frame_buffer_update(addr_t baseAddress, int32 width, int32 height, int32 depth,
bool
frame_buffer_console_available(void)
{
return sConsole.frame_buffer != NULL;
return sConsole.frame_buffer != 0;
}
@ -425,8 +425,7 @@ frame_buffer_console_init_post_modules(kernel_args *args)
{
mutex_init(&sConsole.lock, "console_lock");
// TODO: enable MTRR in VESA mode!
if (sConsole.frame_buffer == NULL)
if (sConsole.frame_buffer == 0)
return B_OK;
// try to set frame buffer memory to write combined
@ -447,7 +446,7 @@ _user_frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
if (geteuid() != 0)
return B_NOT_ALLOWED;
if (IS_USER_ADDRESS(baseAddress) && baseAddress != NULL)
if (IS_USER_ADDRESS(baseAddress) && baseAddress != 0)
return B_BAD_ADDRESS;
return frame_buffer_update(baseAddress, width, height, depth, bytesPerRow);

View File

@ -1262,7 +1262,7 @@ get_next_loaded_module_name(uint32 *_cookie, char *buffer, size_t *_bufferSize)
{
if (sModulesHash == NULL) {
dprintf("get_next_loaded_module_name() called too early!\n");
return NULL;
return B_ERROR;
}
//TRACE(("get_next_loaded_module_name(\"%s\")\n", buffer));

View File

@ -724,7 +724,7 @@ sigaction_etc(thread_id threadID, int signal, const struct sigaction *act,
// remove pending signal if it should now be ignored
atomic_and(&thread->sig_pending, ~SIGNAL_TO_MASK(signal));
} else if (act && act->sa_handler == SIG_DFL
&& (SIGNAL_TO_MASK(signal) & DEFAULT_IGNORE_SIGNALS) != NULL) {
&& (SIGNAL_TO_MASK(signal) & DEFAULT_IGNORE_SIGNALS) != 0) {
// remove pending signal for those signals whose default
// action is to ignore them
atomic_and(&thread->sig_pending, ~SIGNAL_TO_MASK(signal));

View File

@ -1434,7 +1434,7 @@ vm_create_anonymous_area(team_id team, const char *name, void **address,
AddressSpaceWriteLocker locker;
status_t status = locker.SetTo(team);
if (status != NULL)
if (status != B_OK)
return status;
vm_address_space *addressSpace = locker.AddressSpace();
@ -2837,7 +2837,7 @@ dump_cache_tree(int argc, char **argv)
}
addr_t address = strtoul(argv[1], NULL, 0);
if (address == NULL)
if (address == 0)
return 0;
vm_cache *cache = (vm_cache *)address;
@ -2923,7 +2923,7 @@ dump_cache(int argc, char **argv)
}
addr_t address = strtoul(argv[i], NULL, 0);
if (address == NULL)
if (address == 0)
return 0;
cache = (vm_cache *)address;