diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2007-06-11 20:08:11 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2007-06-11 20:08:11 +0200 |
commit | b50204eabab7a2f5f21f12e5668f7c8d954aa84a (patch) | |
tree | 990dd80476428acc6ab9048bfea9e5ef35e83bc4 /inotail.c | |
parent | 9c0be883f40880366241e5953cfa36f20f3c3fc4 (diff) |
inotail.c/.h: Clean up a bit
Diffstat (limited to 'inotail.c')
-rw-r--r-- | inotail.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -30,7 +30,6 @@ #include <fcntl.h> #include <errno.h> #include <getopt.h> -#include <assert.h> #include <sys/types.h> #include <sys/stat.h> @@ -40,7 +39,6 @@ #include "inotail.h" #define PROGRAM_NAME "inotail" -#define BUFFER_SIZE 4096 /* inotify event buffer length for one file */ #define INOTIFY_BUFLEN (4 * sizeof(struct inotify_event)) @@ -233,12 +231,6 @@ static off_t bytes_to_offset(struct file_struct *f, unsigned long n_bytes) /* For now more or less a copy of pipe_lines() from coreutils tail */ static ssize_t tail_pipe_lines(struct file_struct *f, unsigned long n_lines) { - struct line_buf { - char buf[BUFFER_SIZE]; - size_t n_lines; - size_t n_bytes; - struct line_buf *next; - }; struct line_buf *first, *last, *tmp; ssize_t rc; unsigned long total_lines = 0; @@ -314,7 +306,6 @@ static ssize_t tail_pipe_lines(struct file_struct *f, unsigned long n_lines) size_t j; for (j = total_lines - n_lines; j; --j) { p = memchr(p, '\n', tmp->buf + tmp->n_bytes - p); - assert(p); ++p; } } |