From 72d3076d685075808fa9b1533fbaf9ea385df289 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 17 Jun 2007 12:19:46 +0200 Subject: inotail.c: Use emalloc --- inotail.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'inotail.c') 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]; -- cgit v1.2.3-54-g00ecf