Project

General

Profile

Bug #5588 » 0001-5588-invalid-use-of-NULL-in-itm_util.c.patch

Richard PALO, 2015-02-04 08:15 AM

View differences:

usr/src/cmd/geniconvtbl/itm_util.c
126 126
	du->obj = direc = malloc_vital(sizeof (itm_direc_t));
127 127

  
128 128
	if (NULL != cond) {
129
		direc->condition.itm_ptr = 0;
129
		direc->condition.itm_ptr = (uintptr_t)NULL;
130 130
		cond->referencer = &(direc->condition);
131 131
		du->ref[0] = cond;
132 132
	} else if (NULL != cond_name) {
......
182 182
#if !defined(_LP64)
183 183
		tbl->name.itm_pad = 0;
184 184
#endif
185
		tbl->name.itm_ptr = NULL;
185
		tbl->name.itm_ptr = 0;
186 186
	}
187 187
	tbl->size = (sizeof (itm_tbl_hdr_t)) + (obj_array.num	*obj_size);
188 188
	tbl->number = obj_array.num;
......
534 534
	unsigned char		*byte_seq_max;
535 535
	unsigned char		*p;
536 536
	long			i;
537
	itmc_map_type_t		map_type = NULL;
537
	itmc_map_type_t		map_type = ITMC_MAP_UNKNOWN;
538 538
	itmc_map_name_type_t	*map_name_type;
539 539
	long			hash_factor;
540 540
	long			result_len_specfied = 0;
......
546 546
	if (attr != NULL) {
547 547
		map_type = check_map_type(attr);
548 548
	}
549
	if (NULL == map_type) {
549
	if (ITMC_MAP_UNKNOWN == map_type) {
550 550
		map_type = ITMC_MAP_AUTOMATIC;
551 551
	}
552 552
	hash_factor = ((NULL != attr) && (attr->hash_factor != 0)) ?
(1-1/2)