summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-16 18:34:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-16 18:34:06 +0000
commita91fce241ec0acb77eeb44fdb6a2c82f6498e116 (patch)
treedd8db9eba39277a416b3d1e4fd0bdd76e983a4fb
parente77bb9ada09f611121a1f25212dba8df3db557b3 (diff)
ftruncate() with ftello() instead of ftell(); ok millert
-rw-r--r--usr.sbin/authpf/authpf.c4
-rw-r--r--usr.sbin/cron/crontab.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index 12f86c694df..79b32a26a1f 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.85 2004/08/08 00:05:09 deraadt Exp $ */
+/* $OpenBSD: authpf.c,v 1.86 2004/09/16 18:34:05 deraadt Exp $ */
/*
* Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org).
@@ -282,7 +282,7 @@ main(int argc, char *argv[])
rewind(pidfp);
fprintf(pidfp, "%ld\n%s\n", (long)getpid(), luser);
fflush(pidfp);
- (void) ftruncate(fileno(pidfp), ftell(pidfp));
+ (void) ftruncate(fileno(pidfp), ftello(pidfp));
if (change_filter(1, luser, ipsrc) == -1) {
printf("Unable to modify filters\r\n");
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index ba2b7688cdb..1d68908804e 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.45 2004/06/22 03:15:33 avsm Exp $ */
+/* $OpenBSD: crontab.c,v 1.46 2004/09/16 18:34:05 deraadt Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -22,7 +22,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char const rcsid[] = "$OpenBSD: crontab.c,v 1.45 2004/06/22 03:15:33 avsm Exp $";
+static char const rcsid[] = "$OpenBSD: crontab.c,v 1.46 2004/09/16 18:34:05 deraadt Exp $";
#endif
/* crontab - install and manage per-user crontab files
@@ -542,7 +542,7 @@ replace_cmd(void) {
Set_LineNum(1)
while (EOF != (ch = get_char(NewCrontab)))
putc(ch, tmp);
- ftruncate(fileno(tmp), ftell(tmp)); /* XXX redundant with "w+"? */
+ ftruncate(fileno(tmp), ftello(tmp)); /* XXX redundant with "w+"? */
fflush(tmp); rewind(tmp);
if (ferror(tmp)) {