summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inotail.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/inotail.c b/inotail.c
index 069762b..3643c13 100644
--- a/inotail.c
+++ b/inotail.c
@@ -522,11 +522,7 @@ int main(int argc, char **argv)
}
}
- files = malloc(n_files * sizeof(struct file_struct));
- if (unlikely(!files)) {
- fprintf(stderr, "Error: Failed to allocate memory (%s)\n", strerror(errno));
- exit(EXIT_FAILURE);
- }
+ files = emalloc(n_files * sizeof(struct file_struct));
for (i = 0; i < n_files; i++) {
files[i].name = filenames[i];