summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-02-19 09:46:20 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-02-19 09:46:20 +0000
commitdb4804f757157bc2ccbc195891c18b0d2986f492 (patch)
treea0593c35a954d2ca3743e6358d7cfec31c33214a
parent956e26b171e5c1790f2a93afef750e722ff9a12f (diff)
Cleanup.
-rw-r--r--sbin/isakmpd/isakmpd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index 006d11154ab..98c2f506daf 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.54 2004/01/16 10:51:57 hshoexer Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.55 2004/02/19 09:46:19 ho Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -339,18 +339,18 @@ write_pid_file (void)
{
FILE *fp;
- /* Ignore errors. XXX Will fail with USE_PRIVSEP. */
+ /* Ignore errors. This will fail with USE_PRIVSEP. */
unlink (pid_file);
fp = monitor_fopen (pid_file, "w");
if (fp != NULL)
{
- /* XXX Error checking! */
- fprintf (fp, "%ld\n", (long) getpid ());
+ if (fprintf (fp, "%ld\n", (long) getpid ()) < 0)
+ log_error ("main: failed to write PID to \"%.100s\"", pid_file);
fclose (fp);
}
else
- log_fatal ("main: fopen (\"%s\", \"w\") failed", pid_file);
+ log_fatal ("main: fopen (\"%.100s\", \"w\") failed", pid_file);
}
int