mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
seq-file: use SEEK_ macros instead of hardcoded numbers
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>
This commit is contained in:
committed by
Linus Torvalds
parent
80d26af89a
commit
80de7f7ae0
@@ -308,9 +308,9 @@ loff_t seq_lseek(struct file *file, loff_t offset, int whence)
|
|||||||
mutex_lock(&m->lock);
|
mutex_lock(&m->lock);
|
||||||
m->version = file->f_version;
|
m->version = file->f_version;
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case 1:
|
case SEEK_CUR:
|
||||||
offset += file->f_pos;
|
offset += file->f_pos;
|
||||||
case 0:
|
case SEEK_SET:
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
break;
|
break;
|
||||||
retval = offset;
|
retval = offset;
|
||||||
|
Reference in New Issue
Block a user