diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-12-14 13:24:33 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-12-14 13:24:33 +0100 |
commit | fe74ee5657619010c3cccb11ee3040b7f66e1ace (patch) | |
tree | 267bcf767c63b45da8b247b39dd084caf77d35f3 | |
parent | ca8ce36b74c88d8aa1e4b73239b5a4c53adfa161 (diff) |
inotail.c: Save 2 LOC
-rw-r--r-- | inotail.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -171,10 +171,8 @@ static off_t lines_to_offset_from_begin(struct file_struct *f, unsigned int n_li for (i = 0; i < block_size; i++) { if (buf[i] == '\n') { n_lines--; - if (n_lines == 0) { - offset += i + 1; - return offset; - } + if (n_lines == 0) + return offset + i + 1; } } |