summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-17 07:11:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-09-17 07:11:56 +0000
commit294fa3de1ec76d18d6b7fe4e961f7ae2f09b567b (patch)
treef982bf1fb9b5a06c2a84bed97fb04285b35100f7 /sbin
parentc35ea2410832f6adf4985d1b4bb037bee29be14e (diff)
ugly spacing
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pflogd/pflogd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/pflogd/pflogd.c b/sbin/pflogd/pflogd.c
index 5d5ec25dbcb..991cdfd3ade 100644
--- a/sbin/pflogd/pflogd.c
+++ b/sbin/pflogd/pflogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pflogd.c,v 1.30 2004/08/08 19:04:25 deraadt Exp $ */
+/* $OpenBSD: pflogd.c,v 1.31 2004/09/17 07:11:55 deraadt Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -390,8 +390,9 @@ dump_packet_nobuf(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
}
if (fwrite((char *)h, sizeof(*h), 1, f) != 1) {
- /* try to undo header to prevent corruption */
off_t pos = ftello(f);
+
+ /* try to undo header to prevent corruption */
if (pos < sizeof(*h) ||
ftruncate(fileno(f), pos - sizeof(*h))) {
logmsg(LOG_ERR, "Write failed, corrupted logfile!");