summaryrefslogtreecommitdiffstats
path: root/gl/ftello.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/ftello.c')
-rw-r--r--gl/ftello.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gl/ftello.c b/gl/ftello.c
index b0a20bf3..e4f96d1a 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
1/* An ftello() function that works around platform bugs. 1/* An ftello() function that works around platform bugs.
2 Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -124,13 +124,11 @@ ftello (FILE *fp)
124 gets confused by this. */ 124 gets confused by this. */
125 if (fp_->_flag & _IOWRT) 125 if (fp_->_flag & _IOWRT)
126 { 126 {
127 off_t pos;
128
129 /* Call ftello nevertheless, for the side effects that it does on fp. */ 127 /* Call ftello nevertheless, for the side effects that it does on fp. */
130 ftello (fp); 128 ftello (fp);
131 129
132 /* Compute the file position ourselves. */ 130 /* Compute the file position ourselves. */
133 pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); 131 off_t pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR);
134 if (pos >= 0) 132 if (pos >= 0)
135 { 133 {
136 if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) 134 if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL)