diff options
Diffstat (limited to 'command/tail.c')
-rw-r--r-- | command/tail.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/command/tail.c b/command/tail.c index 8137eca..64f4608 100644 --- a/command/tail.c +++ b/command/tail.c @@ -23,10 +23,10 @@ static size_t tail_file_lines(FILE* file, unsigned int count, size_t skip) { size_t len; char* line; - ring = malloc(sizeof(char*) * count); + ring = xalloc(sizeof(char*) * count); memset(ring, 0, sizeof(char*) * count); - ring_len = malloc(sizeof(int) * count); + ring_len = xalloc(sizeof(int) * count); index = 0; size = 0; @@ -74,7 +74,7 @@ static size_t tail_file_chars(FILE* file, unsigned int count, size_t skip) { unsigned int size, i; int read, c; - ring = malloc(sizeof(char) * count); + ring = xalloc(sizeof(char) * count); memset(ring, 0, count); index = 0; |