lkml.org 
[lkml]   [2013]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] seq-file: Use SEEK_ macros instead of hardcoded numbers
Date
From: Cyrill Gorcunov <gorcunov@openvz.org>

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
fs/seq_file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.git/fs/seq_file.c
===================================================================
--- linux-2.6.git.orig/fs/seq_file.c
+++ linux-2.6.git/fs/seq_file.c
@@ -308,9 +308,9 @@ loff_t seq_lseek(struct file *file, loff
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;

\
 
 \ /
  Last update: 2013-01-22 13:41    [W:0.031 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site