--- Gnu-Mach/ipc/mach_debug.c 2020/09/02 04:36:56 1.1 +++ Gnu-Mach/ipc/mach_debug.c 2020/09/02 04:45:05 1.1.1.3 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -33,7 +33,7 @@ * Exported kernel calls. See mach_debug/mach_debug.defs. */ -#include +#include #include #include @@ -112,7 +112,7 @@ host_ipc_hash_info( mach_msg_type_number_t *countp) { vm_offset_t addr; - vm_size_t size; + vm_size_t size = 0; /* Suppress gcc warning */ hash_info_bucket_t *info; unsigned int potential, actual; kern_return_t kr; @@ -277,11 +277,11 @@ mach_port_space_info( ipc_info_name_t *table_info; unsigned int table_potential, table_actual; vm_offset_t table_addr; - vm_size_t table_size; + vm_size_t table_size = 0; /* Suppress gcc warning */ ipc_info_tree_name_t *tree_info; unsigned int tree_potential, tree_actual; vm_offset_t tree_addr; - vm_size_t tree_size; + vm_size_t tree_size = 0; /* Suppress gcc warning */ ipc_tree_entry_t tentry; ipc_entry_t table; ipc_entry_num_t tsize; @@ -381,11 +381,7 @@ mach_port_space_info( iin->iin_name = MACH_PORT_MAKEB(index, bits); iin->iin_collision = (bits & IE_BITS_COLLISION) ? TRUE : FALSE; -#if MACH_IPC_COMPAT - iin->iin_compat = (bits & IE_BITS_COMPAT) ? TRUE : FALSE; -#else MACH_IPC_COMPAT iin->iin_compat = FALSE; -#endif MACH_IPC_COMPAT iin->iin_marequest = (bits & IE_BITS_MAREQUEST) ? TRUE : FALSE; iin->iin_type = IE_BITS_TYPE(bits); iin->iin_urefs = IE_BITS_UREFS(bits); @@ -406,11 +402,7 @@ mach_port_space_info( iin->iin_name = tentry->ite_name; iin->iin_collision = (bits & IE_BITS_COLLISION) ? TRUE : FALSE; -#if MACH_IPC_COMPAT - iin->iin_compat = (bits & IE_BITS_COMPAT) ? TRUE : FALSE; -#else MACH_IPC_COMPAT iin->iin_compat = FALSE; -#endif MACH_IPC_COMPAT iin->iin_marequest = (bits & IE_BITS_MAREQUEST) ? TRUE : FALSE; iin->iin_type = IE_BITS_TYPE(bits); iin->iin_urefs = IE_BITS_UREFS(bits); @@ -455,7 +447,7 @@ mach_port_space_info( table_size - rsize_used); if (size_used != rsize_used) - bzero((char *) (table_addr + size_used), + memset((char *) (table_addr + size_used), 0, rsize_used - size_used); kr = vm_map_copyin(ipc_kernel_map, table_addr, rsize_used, @@ -490,7 +482,7 @@ mach_port_space_info( tree_size - rsize_used); if (size_used != rsize_used) - bzero((char *) (tree_addr + size_used), + memset((char *) (tree_addr + size_used), 0, rsize_used - size_used); kr = vm_map_copyin(ipc_kernel_map, tree_addr, rsize_used,