diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-06-09 20:26:25 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-06-09 20:26:25 +0000 |
commit | b31b0be8199777f8741acab0495876f626311542 (patch) | |
tree | b3a9bae525ea865191b97b02e3e915d5db52de87 /res/res_musiconhold.c | |
parent | 13a98f92fe905e9bd2ef752ea96d4fd89ebf2288 (diff) |
various minor portability fixes (mostly from tholo for OpenBSD)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 46796bfe8..b19fb69fc 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -752,7 +752,7 @@ static int moh_scan_files(struct mohclass *class) { DIR *files_DIR; struct dirent *files_dirent; - char path[512]; + char path[PATH_MAX]; char filepath[PATH_MAX]; char *ext; struct stat statbuf; @@ -770,7 +770,7 @@ static int moh_scan_files(struct mohclass *class) { class->total_files = 0; dirnamelen = strlen(class->dir) + 2; - getcwd(path, 512); + getcwd(path, sizeof(path)); chdir(class->dir); while ((files_dirent = readdir(files_DIR))) { /* The file name must be at least long enough to have the file type extension */ |