From d38a52fa5d45dc1933b57ca6689892bc90e582b2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Jun 2002 08:48:29 +0000 Subject: 2002-06-07 Roland McGrath * firmlink.c (trivfs_S_io_readable): Use intptr_t, not off_t. (trivfs_S_io_read): Likewise. --- trans/firmlink.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'trans') diff --git a/trans/firmlink.c b/trans/firmlink.c index 1a8740f3..6ac63566 100644 --- a/trans/firmlink.c +++ b/trans/firmlink.c @@ -1,8 +1,7 @@ /* A translator for `firmlinks' - Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. - - Written by Miles Bader + Copyright (C) 1997,98,99,2001,02 Free Software Foundation, Inc. + Written by Miles Bader This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -18,6 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -214,8 +214,8 @@ trivfs_S_io_read (struct trivfs_protid *cred, err = EBADF; else { - off_t max = strlen (target); - off_t start = offs >= 0 ? offs : (off_t)cred->po->hook; + size_t max = strlen (target); + intptr_t start = offs >= 0 ? offs : (intptr_t)cred->po->hook; if (start < 0) return EINVAL; if (start + amount > max) @@ -248,10 +248,10 @@ trivfs_S_io_readable (struct trivfs_protid *cred, return EOPNOTSUPP; else if (! (cred->po->openmodes & O_READ)) return EBADF; - else if ((off_t)cred->po->hook < 0) + else if ((intptr_t)cred->po->hook < 0) return EINVAL; else - *amount = strlen (target) - (off_t)cred->po->hook; + *amount = strlen (target) - (intptr_t)cred->po->hook; return 0; } -- cgit v1.2.3