summaryrefslogtreecommitdiffstats
path: root/src/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.c')
-rwxr-xr-xsrc/event.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/event.c b/src/event.c
index 109313f..9b1cd63 100755
--- a/src/event.c
+++ b/src/event.c
@@ -1,4 +1,4 @@
-/* $calcurse: event.c,v 1.14 2009/07/05 20:33:19 culot Exp $ */
+/* $calcurse: event.c,v 1.15 2009/07/19 08:20:00 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -57,16 +57,7 @@ event_free_bkp (erase_flag_e flag)
mem_free (bkp_cut_event.mesg);
bkp_cut_event.mesg = 0;
}
- if (bkp_cut_event.note)
- {
- if (flag == ERASE_FORCE)
- erase_note (&bkp_cut_event.note, ERASE_FORCE);
- else
- {
- mem_free (bkp_cut_event.note);
- bkp_cut_event.note = 0;
- }
- }
+ erase_note (&bkp_cut_event.note, flag);
}
static void
@@ -92,8 +83,7 @@ event_llist_free (void)
o = *i;
*i = o->next;
mem_free (o->mesg);
- if (o->note)
- mem_free (o->note);
+ erase_note (&o->note, ERASE_FORCE_KEEP_NOTE);
mem_free (o);
}
}
@@ -224,8 +214,7 @@ event_delete_bynum (long start, unsigned num, erase_flag_e flag)
case ERASE_CUT:
event_free_bkp (ERASE_FORCE);
event_dup (i, &bkp_cut_event);
- if (i->note)
- mem_free (i->note);
+ erase_note (&i->note, ERASE_FORCE_KEEP_NOTE);
/* FALLTHROUGH */
default:
*iptr = i->next;