summaryrefslogtreecommitdiff
path: root/res/ael
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2012-05-10 18:35:14 +0000
committerJonathan Rose <jrose@digium.com>2012-05-10 18:35:14 +0000
commit8227f70cd70f497cb03c1f9aab63950bcd979d8b (patch)
tree4f4587c0997f7a2d7ad8c6ecc89c3ad2971d5027 /res/ael
parent3430da58e9f168e608e46133225e0fc81589f6ef (diff)
Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1905/ ........ Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ael')
-rw-r--r--res/ael/ael.flex8
1 files changed, 6 insertions, 2 deletions
diff --git a/res/ael/ael.flex b/res/ael/ael.flex
index 4d441fb73..dab6ac05c 100644
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
@@ -805,7 +805,9 @@ struct pval *ael2_parse(char *filename, int *errors)
if (my_file)
free(my_file);
my_file = strdup(filename);
- stat(filename, &stats);
+ if (stat(filename, &stats)) {
+ ast_log(LOG_WARNING, "failed to populate stats from file '%s'\n", filename);
+ }
buffer = (char*)malloc(stats.st_size+2);
if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
@@ -875,7 +877,9 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
} else {
char *buffer;
struct stat stats;
- stat(fnamebuf2, &stats);
+ if (stat(fnamebuf2, &stats)) {
+ ast_log(LOG_WARNING, "Failed to populate stats from file '%s'\n", fnamebuf2);
+ }
buffer = (char*)malloc(stats.st_size+1);
if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));