Prefer PATH_MAX to non-standard MAXPATHLEN.

This commit is contained in:
Jilles Tjoelker 2011-10-28 16:45:18 +02:00
parent c55b2782fc
commit d74fa5b502
5 changed files with 16 additions and 16 deletions

View file

@ -54,7 +54,7 @@ struct module
struct module_path
{
char path[MAXPATHLEN];
char path[PATH_MAX];
};
#define MAPI_MAGIC_HDR 0x4D410000

View file

@ -71,8 +71,8 @@ char *alloca();
#ifdef _WIN32
#include <process.h>
#ifndef MAXPATHLEN
#define MAXPATHLEN 128
#ifndef PATH_MAX
#define PATH_MAX 128
#endif
#ifdef strerror

View file

@ -227,7 +227,7 @@ load_help(void)
{
DIR *helpfile_dir = NULL;
struct dirent *ldirent= NULL;
char filename[MAXPATHLEN];
char filename[PATH_MAX];
struct cachefile *cacheptr;
struct DictionaryIter iter;

View file

@ -258,7 +258,7 @@ load_all_modules(int warn)
void
load_core_modules(int warn)
{
char module_name[MAXPATHLEN];
char module_name[PATH_MAX];
int i;
@ -286,7 +286,7 @@ load_core_modules(int warn)
int
load_one_module(const char *path, int coremodule)
{
char modpath[MAXPATHLEN];
char modpath[PATH_MAX];
rb_dlink_node *pathst;
struct module_path *mpath;

View file

@ -2098,15 +2098,15 @@ static struct ConfEntry conf_admin_table[] =
static struct ConfEntry conf_log_table[] =
{
{ "fname_userlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_userlog },
{ "fname_fuserlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_fuserlog },
{ "fname_operlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_operlog },
{ "fname_foperlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_foperlog },
{ "fname_serverlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_serverlog },
{ "fname_killlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_killlog },
{ "fname_klinelog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_klinelog },
{ "fname_operspylog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_operspylog },
{ "fname_ioerrorlog", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.fname_ioerrorlog },
{ "fname_userlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_userlog },
{ "fname_fuserlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_fuserlog },
{ "fname_operlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_operlog },
{ "fname_foperlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_foperlog },
{ "fname_serverlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_serverlog },
{ "fname_killlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_killlog },
{ "fname_klinelog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_klinelog },
{ "fname_operspylog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_operspylog },
{ "fname_ioerrorlog", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.fname_ioerrorlog },
{ "\0", 0, NULL, 0, NULL }
};
@ -2192,7 +2192,7 @@ static struct ConfEntry conf_general_table[] =
{ "default_operstring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_operstring },
{ "default_adminstring",CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.default_adminstring },
{ "servicestring", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.servicestring },
{ "egdpool_path", CF_QSTRING, NULL, MAXPATHLEN, &ConfigFileEntry.egdpool_path },
{ "egdpool_path", CF_QSTRING, NULL, PATH_MAX, &ConfigFileEntry.egdpool_path },
{ "kline_reason", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.kline_reason },
{ "identify_service", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifyservice },
{ "identify_command", CF_QSTRING, NULL, REALLEN, &ConfigFileEntry.identifycommand },