summaryrefslogtreecommitdiff
path: root/src/apoint.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-07-19 08:19:37 +0000
committerFrederic Culot <calcurse@culot.org>2009-07-19 08:19:37 +0000
commit5dcc213c164a1f25cad4bd76617dc780f5e1dc6f (patch)
tree655127ff74d3a72bacf6bde1a4cb0f7f9733c9fc /src/apoint.c
parenta4da35c65f77113f998cd60d8a1a10d108138951 (diff)
downloadcalcurse-5dcc213c164a1f25cad4bd76617dc780f5e1dc6f.zip
Make use of erase_note() whenever possible.
Diffstat (limited to 'src/apoint.c')
-rwxr-xr-xsrc/apoint.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 4a8d3ef..91c7885 100755
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -1,4 +1,4 @@
-/* $calcurse: apoint.c,v 1.36 2009/07/12 16:21:58 culot Exp $ */
+/* $calcurse: apoint.c,v 1.37 2009/07/19 08:20:00 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -65,16 +65,7 @@ apoint_free_bkp (erase_flag_e flag)
mem_free (bkp_cut_apoint.mesg);
bkp_cut_apoint.mesg = 0;
}
- if (bkp_cut_apoint.note)
- {
- if (flag == ERASE_FORCE)
- erase_note (&bkp_cut_apoint.note, ERASE_FORCE);
- else
- {
- mem_free (bkp_cut_apoint.note);
- bkp_cut_apoint.note = 0;
- }
- }
+ erase_note (&bkp_cut_apoint.note, flag);
}
static void
@@ -114,8 +105,7 @@ apoint_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);
}
mem_free (alist_p);
@@ -547,8 +537,7 @@ apoint_delete_bynum (long start, unsigned num, erase_flag_e flag)
case ERASE_CUT:
apoint_free_bkp (ERASE_FORCE);
apoint_dup (i, &bkp_cut_apoint);
- if (i->note)
- mem_free (i->note);
+ erase_note (&i->note, ERASE_FORCE_KEEP_NOTE);
/* FALLTHROUGH */
default:
if (notify_bar ())