Skip to content

Commit

Permalink
* vfs/fish.c (fish_linear_start): Use _FILE_OFFSET_BITS to determine …
Browse files Browse the repository at this point in the history
…which

length modifier to pass to sscanf(). Use 'll' length modifier instead
of 'L' since 'L' is meant for doubles.
  • Loading branch information
ptsekov committed Apr 26, 2007
1 parent eca5afa commit 9312932
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions vfs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2007-04-26 Pavel Tsekov <[email protected]>

* fish.c (fish_linear_start): Use _FILE_OFFSET_BITS to determine which
length modifier to pass to sscanf(). Use 'll' length modifier instead
of 'L' since 'L' is meant for doubles.

2006-11-09 Jindrich Novy <[email protected]>

* fish.c (fish_file_store): Fix copy of file names with backticks to
Expand Down
6 changes: 5 additions & 1 deletion vfs/fish.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,11 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
fh->linear = LS_LINEAR_OPEN;
fh->u.fish.got = 0;
if (sscanf( reply_str, "%Lu", &fh->u.fish.total )!=1)
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
if (sscanf( reply_str, "%llu", &fh->u.fish.total )!=1)
#else
if (sscanf( reply_str, "%u", &fh->u.fish.total )!=1)
#endif
ERRNOR (E_REMOTE, 0);
return 1;
}
Expand Down

0 comments on commit 9312932

Please sign in to comment.