Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2010 08:08:56 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202277 - head/lib/libc/gen
Message-ID:  <201001140808.o0E88uwq071559@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Thu Jan 14 08:08:55 2010
New Revision: 202277
URL: http://svn.freebsd.org/changeset/base/202277

Log:
  Don't use fseeko() to obtain the file offset.
  
  I was a bit confused with lseek(), which returns the new offset. We
  should ftello() to obtain it using stdio.

Modified:
  head/lib/libc/gen/pututxline.c

Modified: head/lib/libc/gen/pututxline.c
==============================================================================
--- head/lib/libc/gen/pututxline.c	Thu Jan 14 07:13:06 2010	(r202276)
+++ head/lib/libc/gen/pututxline.c	Thu Jan 14 08:08:55 2010	(r202277)
@@ -96,7 +96,7 @@ utx_active_add(const struct futx *fu)
 		default:
 			/* Allow us to overwrite unused records. */
 			if (partial == -1)
-				partial = fseeko(fp, 0, SEEK_CUR) - sizeof fe;
+				partial = ftello(fp) - sizeof fe;
 			break;
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001140808.o0E88uwq071559>