diff options
author | James Booth <boothj5@gmail.com> | 2014-07-18 23:52:00 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-07-18 23:52:00 +0100 |
commit | bf62d8bd65302df5fbf02f66297f35e5732a0e2d (patch) | |
tree | eac14d30d8db8144f7ae96595cd054c15be7eb6e | |
parent | 78b0388b6c83cb03194ae03ad4323ee3a9170c0e (diff) | |
download | profani-tty-bf62d8bd65302df5fbf02f66297f35e5732a0e2d.tar.gz |
Use PAD_SIZE for buffer max size
-rw-r--r-- | src/ui/buffer.c | 2 | ||||
-rw-r--r-- | src/ui/buffer.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 60ee91dc..903d0662 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -61,7 +61,7 @@ buffer_push(ProfBuff buffer, const char show_char, const char * const date_fmt, e->message = malloc(strlen(message)+1); strcpy(e->message, message); - if (g_slist_length(buffer->entries) == BUFF_SIZE) { + if (g_slist_length(buffer->entries) == PAD_SIZE) { _free_entry(buffer->entries->data); buffer->entries = g_slist_delete_link(buffer->entries, buffer->entries); } diff --git a/src/ui/buffer.h b/src/ui/buffer.h index fec46a36..24bdac84 100644 --- a/src/ui/buffer.h +++ b/src/ui/buffer.h @@ -3,8 +3,6 @@ #include "config.h" -#define BUFF_SIZE 1000 - typedef struct prof_buff_entry_t { char show_char; char *date_fmt; |