diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2007-06-17 12:19:46 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2007-06-17 12:19:46 +0200 |
commit | 72d3076d685075808fa9b1533fbaf9ea385df289 (patch) | |
tree | ae37323e689ee1ea5a480e71eef43cee4a318a60 /inotail.c | |
parent | 0cd9dee6d903651bdea1d95bbace8a45b3cdaf3a (diff) |
inotail.c: Use emalloc
Diffstat (limited to 'inotail.c')
-rw-r--r-- | inotail.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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]; |