1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Fix compiler warning

Initialise @td to NULL in textarea_edit.  Assert @td in done_textarea_data while we're at it.
This commit is contained in:
Miciah Dashiel Butler Masters 2007-09-01 23:46:37 +00:00 committed by Miciah Dashiel Butler Masters
parent e0f0112de9
commit 596b9b4d72

View File

@ -610,6 +610,8 @@ init_textarea_data(struct terminal *term, struct form_state *fs,
static void
done_textarea_data(struct textarea_data *td)
{
assert(td);
mem_free(td->fn);
mem_free(td);
}
@ -629,7 +631,7 @@ void
textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
struct document_view *doc_view_, struct link *link_)
{
struct textarea_data *td;
struct textarea_data *td = NULL;
assert ((op == 0 || op == 1) && term_);
if_assert_failed return;