From fafd75c807a55fead289ed12fc750e08ab6f71a1 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Sun, 18 Nov 2012 14:11:30 +0400 Subject: [PATCH] lib/vfs/direntry.c: types accuracy. Signed-off-by: Andrew Borodin --- lib/vfs/direntry.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index 016f96d45..5607987dc 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -561,7 +561,6 @@ vfs_s_readlink (const vfs_path_t * vpath, char *buf, size_t size) static ssize_t vfs_s_read (void *fh, char *buffer, size_t count) { - int n; struct vfs_class *me = FH_SUPER->me; if (FH->linear == LS_LINEAR_PREOPEN) @@ -578,6 +577,8 @@ vfs_s_read (void *fh, char *buffer, size_t count) if (FH->handle != -1) { + ssize_t n; + n = read (FH->handle, buffer, count); if (n < 0) me->verrno = errno; @@ -592,7 +593,6 @@ vfs_s_read (void *fh, char *buffer, size_t count) static ssize_t vfs_s_write (void *fh, const char *buffer, size_t count) { - int n; struct vfs_class *me = FH_SUPER->me; if (FH->linear) @@ -601,6 +601,8 @@ vfs_s_write (void *fh, const char *buffer, size_t count) FH->changed = 1; if (FH->handle != -1) { + ssize_t n; + n = write (FH->handle, buffer, count); if (n < 0) me->verrno = errno; -- 2.11.4.GIT