about summary refs log tree commit diff
path: root/sysdeps/unix/telldir.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-17 10:00:23 +0000
committerRoland McGrath <roland@gnu.org>1996-01-17 10:00:23 +0000
commitb6e9b25ba8590f942fe4b485de57093c2c242211 (patch)
treef875c42f00f3e156f47852a41f7760a8b8513eef /sysdeps/unix/telldir.c
parentb8aec9fa1ae9786d8e241e628efaa71d436516af (diff)
downloadglibc-b6e9b25ba8590f942fe4b485de57093c2c242211.tar.gz
glibc-b6e9b25ba8590f942fe4b485de57093c2c242211.tar.xz
glibc-b6e9b25ba8590f942fe4b485de57093c2c242211.zip
* sysdeps/unix/seekdir.c: Don't modify POS before seeking. cvs/libc-960117
	* sysdeps/unix/telldir.c: Fix position calculation to account for
	buffered data properly.
Diffstat (limited to 'sysdeps/unix/telldir.c')
-rw-r--r--sysdeps/unix/telldir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/telldir.c b/sysdeps/unix/telldir.c
index 5dbf1ca3c1..2b611b0fca 100644
--- a/sysdeps/unix/telldir.c
+++ b/sysdeps/unix/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -39,5 +39,5 @@ DEFUN(telldir, (dirp), DIR *dirp)
   pos = __lseek(dirp->__fd, (off_t) 0, SEEK_CUR);
   if (pos == (off_t) -1)
     return (off_t) -1;
-  return pos + (dirp->__size - dirp->__offset);
+  return pos + dirp->__size - dirp->__offset;
 }