diff options
author | Roland McGrath <roland@gnu.org> | 2002-06-07 08:48:29 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-06-07 08:48:29 +0000 |
commit | d38a52fa5d45dc1933b57ca6689892bc90e582b2 (patch) | |
tree | ae4d59665b49a3818b388e2b5fe97e26602389d1 /trans | |
parent | a0383eff42f9de92c02af24cc093f9e84933119a (diff) |
2002-06-07 Roland McGrath <roland@frob.com>
* firmlink.c (trivfs_S_io_readable): Use intptr_t, not off_t.
(trivfs_S_io_read): Likewise.
Diffstat (limited to 'trans')
-rw-r--r-- | trans/firmlink.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 <miles@gnu.ai.mit.edu> + Copyright (C) 1997,98,99,2001,02 Free Software Foundation, Inc. + Written by Miles Bader <miles@gnu.org> 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 <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -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; } |