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

Use PAD_SIZE for buffer max size

This commit is contained in:
James Booth 2014-07-18 23:52:00 +01:00
parent 78b0388b6c
commit bf62d8bd65
2 changed files with 1 additions and 3 deletions

View File

@ -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);
}

View File

@ -3,8 +3,6 @@
#include "config.h"
#define BUFF_SIZE 1000
typedef struct prof_buff_entry_t {
char show_char;
char *date_fmt;