summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-06-17 12:19:46 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-06-17 12:19:46 +0200
commit72d3076d685075808fa9b1533fbaf9ea385df289 (patch)
treeae37323e689ee1ea5a480e71eef43cee4a318a60
parent0cd9dee6d903651bdea1d95bbace8a45b3cdaf3a (diff)
inotail.c: Use emalloc
-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];