aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-09 20:26:25 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-09 20:26:25 +0000
commit926f67f6828f49103b6c204fe6da0641465e4dad (patch)
treeb3a9bae525ea865191b97b02e3e915d5db52de87 /res/res_musiconhold.c
parent93759871fc4268063f64070935ec5a145ca0f2ed (diff)
various minor portability fixes (mostly from tholo for OpenBSD)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33350 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c4
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 */