Commit b7302d96 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(find_linked_aux_item_list): Don't use an uninitialized variable.

(delete_aux_item_list): Fail if the default branch is reached.
(undelete_aux_item_list): Fail if the default branch is reached.
(aux_item_trigger_mirror_faq): Test data->object for NULLness
	intstead of the uninitialized variable conf_stat.
parent bfbfc3f4
/*
* $Id: aux-items.c,v 1.9 1999/05/12 13:24:58 byers Exp $
* $Id: aux-items.c,v 1.10 1999/05/13 11:44:47 ceder Exp $
* Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -1014,7 +1014,7 @@ find_linked_aux_item_list(Aux_item *item)
case CONF_OBJECT_TYPE:
GET_C_STAT(conf_stat, item->linked_item.target_object.conf, NULL);
return &text_stat->aux_item_list;
return &conf_stat->aux_item_list;
case INFO_OBJECT_TYPE:
return &kom_info.aux_item_list;
......@@ -1146,6 +1146,7 @@ delete_aux_item_list(Number_list *items_to_delete,
linked_object = NULL;
break;
default:
restart_kom("delete_aux_item_list(): bad target type\n");
}
delete_aux_item_list(&linked_delete,
......@@ -1232,6 +1233,7 @@ undelete_aux_item_list(Number_list *items_to_undelete,
linked_object = NULL;
break;
default:
restart_kom("undelete_aux_item_list(): bad link type\n");
}
undelete_aux_item_list(&linked_undelete,
......@@ -1693,7 +1695,7 @@ void aux_item_trigger_mirror_faq(Aux_item_trigger_data *data)
String_size ill_char;
String_size end_pos;
if (data->object_type != CONF_OBJECT_TYPE || conf_stat == NULL)
if (data->object_type != CONF_OBJECT_TYPE || data->object == NULL)
return;
init_aux_item(&item_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment