diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-04 19:10:56 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-04 19:10:56 (GMT) |
commit | b25ed9dfb2d7c5c4e39b7d26ef033e6744022f00 (patch) | |
tree | 6ae74c7139359b02adab9b0cec98154b3961b8e3 /src/analysis/contents | |
parent | e6e6479710b0a00218437753cf816bf68c99f8ab (diff) |
Replaced calls to perror() by logging when loading file contents.
Diffstat (limited to 'src/analysis/contents')
-rw-r--r-- | src/analysis/contents/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/analysis/contents/file.c b/src/analysis/contents/file.c index 6b55840..5beb0e3 100644 --- a/src/analysis/contents/file.c +++ b/src/analysis/contents/file.c @@ -35,6 +35,7 @@ #include "../content-int.h" #include "../../common/extstr.h" #include "../../common/pathname.h" +#include "../../core/logs.h" @@ -285,7 +286,7 @@ GBinContent *g_file_content_new(const char *filename) fd = open(filename, O_RDONLY); if (fd == -1) { - perror("open"); + LOG_ERROR_N("open"); goto gbcnff_error; } @@ -293,7 +294,7 @@ GBinContent *g_file_content_new(const char *filename) if (ret == -1) { close(fd); - perror("fstat"); + LOG_ERROR_N("fstat"); goto gbcnff_error; } @@ -301,7 +302,7 @@ GBinContent *g_file_content_new(const char *filename) if (content == MAP_FAILED) { close(fd); - perror("mmap"); + LOG_ERROR_N("mmap"); goto gbcnff_error; } |