Module Name: src
Committed By: agc
Date: Wed Apr 14 00:19:52 UTC 2010
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: reader.c
Log Message:
optimise one function a bit
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
src/crypto/external/bsd/netpgp/dist/src/lib/reader.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/netpgp/dist/src/lib/reader.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.32 src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.33
--- src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.32 Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c Wed Apr 14 00:19:52 2010
@@ -54,7 +54,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: reader.c,v 1.32 2010/03/13 23:30:41 agc Exp $");
+__RCSID("$NetBSD: reader.c,v 1.33 2010/04/14 00:19:52 agc Exp $");
#endif
#include <sys/types.h>
@@ -2032,24 +2032,20 @@
int
__ops_setup_file_append(__ops_output_t **output, const char *filename)
{
- int fd;
+ int fd;
+
/*
* initialise needed structures for writing to file
*/
-
#ifdef O_BINARY
fd = open(filename, O_WRONLY | O_APPEND | O_BINARY, 0600);
#else
fd = open(filename, O_WRONLY | O_APPEND, 0600);
#endif
- if (fd < 0) {
- perror(filename);
- return fd;
+ if (fd >= 0) {
+ *output = __ops_output_new();
+ __ops_writer_set_fd(*output, fd);
}
- *output = __ops_output_new();
-
- __ops_writer_set_fd(*output, fd);
-
return fd;
}