From f1d16fb3b3e44054262e4d5d07bee23ebc215aed Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 15 Dec 2006 16:23:04 +0100 Subject: inotail.c: return instead of break --- inotail.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'inotail.c') diff --git a/inotail.c b/inotail.c index 8aa5279..e9238a1 100644 --- a/inotail.c +++ b/inotail.c @@ -124,11 +124,8 @@ static off_t lines_to_offset_from_end(struct file_struct *f, unsigned int n_line for (i = block_size; i > 0; i--) { if (buf[i] == '\n') { n_lines--; - - if (n_lines == 0) { - offset += i + 1; /* We don't want the first \n */ - break; - } + if (n_lines == 0) + return offset += i + 1; /* We don't want the first \n */ } } } -- cgit v1.2.3-54-g00ecf