1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Use HOST_NAME_MAX for userhost and hostname expandos

Use HOST_NAME_MAX instead of hardcoded 100 for userhost
and hostname expandos.
This commit is contained in:
kyak 2015-08-29 15:36:05 +03:00
parent b7d82ecdce
commit b065f2a011

View File

@ -56,7 +56,8 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret)
{ {
IRC_SERVER_REC *ircserver; IRC_SERVER_REC *ircserver;
const char *username; const char *username;
char hostname[100]; char hostname[HOST_NAME_MAX];
ircserver = IRC_SERVER(server); ircserver = IRC_SERVER(server);
@ -80,7 +81,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret)
static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret) static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret)
{ {
IRC_SERVER_REC *ircserver; IRC_SERVER_REC *ircserver;
char hostname[100]; char hostname[HOST_NAME_MAX];
char **list; char **list;
char *hostname_split; char *hostname_split;