Commit 80de7f7a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Linus Torvalds

seq-file: use SEEK_ macros instead of hardcoded numbers

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 80d26af8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment