summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-01-05 19:07:24 +0100
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-01-05 19:07:24 +0100
commita388181df16d237c164ddf79cde6aed58dee6a8e (patch)
tree6215eaae723918edcd034d39adc1da66b945430c /inotail.c
parentb356ec8affa09366306c3d93fecc87d3fe1d2f9c (diff)
inotail.c: Make tail_pipe() return ssize_t
read() returns ssize_t and we were casting it to signed int which might be smaller on some architectures.
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index 26092d3..783ac3b 100644
--- a/inotail.c
+++ b/inotail.c
@@ -196,9 +196,9 @@ static off_t bytes_to_offset(struct file_struct *f, unsigned int n_bytes)
return (from_begin ? ((off_t) n_bytes - 1) : (f->st_size - (off_t) n_bytes));
}
-static int tail_pipe(struct file_struct *f)
+static ssize_t tail_pipe(struct file_struct *f)
{
- int rc;
+ ssize_t rc;
char buf[BUFFER_SIZE];
if (verbose)