summaryrefslogtreecommitdiffstats
path: root/src/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.c')
-rw-r--r--src/strings.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/strings.c b/src/strings.c
index eb278f8e..04aac3b6 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -298,8 +298,7 @@ parse_opt (int key, char *arg,
case ARGP_KEY_FINI:
/* Compute the length in bytes of any match. */
if (min_len <= 0 || min_len > INT_MAX / bytes_per_char)
- error (EXIT_FAILURE, 0,
- _("invalid minimum length of matched string size"));
+ error_exit (0, _("invalid minimum length of matched string size"));
min_len_bytes = min_len * bytes_per_char;
break;
@@ -582,7 +581,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
// XXX Eventually add flag which avoids this if the position
// XXX is known to match.
if (from != 0 && lseek (fd, from, SEEK_SET) != from)
- error (EXIT_FAILURE, errno, _("lseek failed"));
+ error_exit (errno, _("lseek failed"));
return read_block_no_mmap (fd, fname, from, to - from);
}
@@ -599,7 +598,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
if (mmap (elfmap, elfmap_size, PROT_READ,
MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, from)
== MAP_FAILED)
- error (EXIT_FAILURE, errno, _("re-mmap failed"));
+ error_exit (errno, _("re-mmap failed"));
elfmap_base = elfmap;
}
@@ -636,7 +635,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
and for this we have to make the data writable. */
if (unlikely (mprotect (elfmap, keep_area, PROT_READ | PROT_WRITE)
!= 0))
- error (EXIT_FAILURE, errno, _("mprotect failed"));
+ error_exit (errno, _("mprotect failed"));
elfmap_base = elfmap + keep_area;
}
@@ -663,7 +662,7 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to)
if (mmap (remap_base, read_now, PROT_READ,
MAP_PRIVATE | MAP_POPULATE | MAP_FIXED, fd, handled_to)
== MAP_FAILED)
- error (EXIT_FAILURE, errno, _("re-mmap failed"));
+ error_exit (errno, _("re-mmap failed"));
elfmap_off = handled_to;
process_chunk (fname, remap_base - to_keep,