hirc

IRC client
Log | Files | Refs

commit 352c4b9e19adbe3794a9cffd72b62f08896bbc9a
parent f30ef115518c8e8f437f8086cce0a931fbb55ad1
Author: hhvn <dev@hhvn.uk>
Date:   Sat, 11 Dec 2021 21:41:27 +0000

hirc.h hist.c: consistent naming of _MAX defines

Diffstat:
Mhirc.h | 4++--
Mhist.c | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hirc.h b/hirc.h @@ -6,8 +6,8 @@ #include "struct.h" #define PARAM_MAX 64 #define INPUT_MAX 8192 -#define MAX_HISTORY 8192 - /* real maximum = MAX_HISTORY * (channels + servers + queries) */ +#define HIST_MAX 8192 + /* real maximum = HIST_MAX * (channels + servers + queries) */ #define strcmp_n(s1, s2) (s1 == s2 ? 0 : (s1 ? s2 ? strcmp(s1, s2) : -1 : -1)) /* strlcpy.c */ diff --git a/hist.c b/hist.c @@ -94,7 +94,7 @@ hist_add(struct HistInfo *histinfo, struct Nick *from, } for (i=0, p = histinfo->history; p && p->next; p = p->next, i++); - if (i == (MAX_HISTORY-1)) { + if (i == (HIST_MAX-1)) { free(p->next); p->next = NULL; }