diff options
author | 2023-06-16 16:02:43 -0300 | |
---|---|---|
committer | 2023-06-28 03:43:51 -0300 | |
commit | 33fb2bed58e9f4dfadd2f69f90e474fd46099419 (patch) | |
tree | 5468ece6e39ed9a8f7be91834a45a106d6357a74 /src/fbuilder | |
parent | RELNOTES: add build items (diff) | |
download | firejail-33fb2bed58e9f4dfadd2f69f90e474fd46099419.tar.gz firejail-33fb2bed58e9f4dfadd2f69f90e474fd46099419.tar.zst firejail-33fb2bed58e9f4dfadd2f69f90e474fd46099419.zip |
Deduplicate calls similar to errExit
Use errExit in every place that uses __FILE__ and __LINE__ manually.
Note: This currently only happens in the duplicated `is_dir` function.
Diffstat (limited to 'src/fbuilder')
-rw-r--r-- | src/fbuilder/utils.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fbuilder/utils.c b/src/fbuilder/utils.c index fa432d003..91c5a1a5e 100644 --- a/src/fbuilder/utils.c +++ b/src/fbuilder/utils.c | |||
@@ -34,10 +34,8 @@ int is_dir(const char *fname) { | |||
34 | rv = stat(fname, &s); | 34 | rv = stat(fname, &s); |
35 | else { | 35 | else { |
36 | char *tmp; | 36 | char *tmp; |
37 | if (asprintf(&tmp, "%s/", fname) == -1) { | 37 | if (asprintf(&tmp, "%s/", fname) == -1) |
38 | fprintf(stderr, "Error: cannot allocate memory, %s:%d\n", __FILE__, __LINE__); | ||
39 | errExit("asprintf"); | 38 | errExit("asprintf"); |
40 | } | ||
41 | rv = stat(tmp, &s); | 39 | rv = stat(tmp, &s); |
42 | free(tmp); | 40 | free(tmp); |
43 | } | 41 | } |