summary refs log tree commit diff
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/imap.c b/imap.c
index 620e282..7d623a5 100644
--- a/imap.c
+++ b/imap.c
@@ -147,18 +147,7 @@ static struct Data parseList(FILE *imap, char close) {
 	if (*ptr) ptr++;
 	struct Data data = { .type = List };
 	while (*ptr != close) {
-		if (data.list.len == data.list.cap) {
-			if (data.list.cap) {
-				data.list.cap *= 2;
-			} else {
-				data.list.cap = 4;
-			}
-			data.list.ptr = realloc(
-				data.list.ptr, sizeof(*data.list.ptr) * data.list.cap
-			);
-			if (!data.list.ptr) err(EX_OSERR, "realloc");
-		}
-		data.list.ptr[data.list.len++] = parseData(imap);
+		listPush(&data.list, parseData(imap));
 	}
 	if (*ptr) ptr++;
 	return data;
682fad0df04a319b87352ea97e18733c&follow=1'>Remove tmuxJune McEnroe tmux configuration was starting to bother me, and it got worse with Sierra. Turns out that neovim terminal emulation is much more natural to work with and requires less configuration, though I still disapprove of the feature being included in an editor! For detaching and attaching sessions, abduco is a simple tool that seems to work decently, but given that I will likely only be running neovim in the sessions, I might come up with something even simpler. 2017-07-04Show terminal title in statuslineJune McEnroe 2017-07-04Add nvim terminal mappingsJune McEnroe 2017-06-29Add color to xxJune McEnroe 2017-06-28Set tmux copy-mode-vi bindings for TarmakJune McEnroe 2017-06-27Link Scala syntax fileJune McEnroe Oops. 2017-06-27Clean up top of trivial colorscheme fileJune McEnroe 2017-06-27Fix Scala syntax highlight linksJune McEnroe