diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-12-15 16:23:04 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-12-15 16:23:04 +0100 |
commit | f1d16fb3b3e44054262e4d5d07bee23ebc215aed (patch) | |
tree | 1966007a9b43f2138e6ba0df68ff8b56e22cd2c7 | |
parent | 5050a2f042287f814f90d8dd314fa57384e6e778 (diff) |
inotail.c: return instead of break
-rw-r--r-- | inotail.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 */ } } } |