Skip to content

Commit

Permalink
seq-file: use SEEK_ macros instead of hardcoded numbers
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Cyrill Gorcunov authored and Linus Torvalds committed Feb 28, 2013
1 parent 80d26af commit 80de7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/seq_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ loff_t seq_lseek(struct file *file, loff_t offset, int whence)
mutex_lock(&m->lock);
m->version = file->f_version;
switch (whence) {
case 1:
case SEEK_CUR:
offset += file->f_pos;
case 0:
case SEEK_SET:
if (offset < 0)
break;
retval = offset;
Expand Down

0 comments on commit 80de7f7

Please sign in to comment.