mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky Review: https://reviewboard.asterisk.org/r/1743/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1099,16 +1099,19 @@ static int moh_scan_files(struct mohclass *class) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < class->total_files; i++)
|
||||
for (i = 0; i < class->total_files; i++) {
|
||||
ast_free(class->filearray[i]);
|
||||
|
||||
}
|
||||
class->total_files = 0;
|
||||
|
||||
if (!getcwd(path, sizeof(path))) {
|
||||
ast_log(LOG_WARNING, "getcwd() failed: %s\n", strerror(errno));
|
||||
closedir(files_DIR);
|
||||
return -1;
|
||||
}
|
||||
if (chdir(dir_path) < 0) {
|
||||
ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
|
||||
closedir(files_DIR);
|
||||
return -1;
|
||||
}
|
||||
while ((files_dirent = readdir(files_DIR))) {
|
||||
|
Reference in New Issue
Block a user