Module Name:    src
Committed By:   agc
Date:           Mon Feb 17 07:39:20 UTC 2014

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: crypto.c

Log Message:
Avoid a warning on Gentoo Linux about fwrite(3) -- their glibc
declares fwrite(3) with the warn_unused_result attribute, from Razvan
Cojocaru


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 \
    src/crypto/external/bsd/netpgp/dist/src/lib/crypto.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/crypto.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.35 src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.36
--- src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.35	Sun Jan  2 18:13:10 2011
+++ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c	Mon Feb 17 07:39:19 2014
@@ -54,7 +54,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: crypto.c,v 1.35 2011/01/02 18:13:10 agc Exp $");
+__RCSID("$NetBSD: crypto.c,v 1.36 2014/02/17 07:39:19 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -286,8 +286,11 @@ write_parsed_cb(const pgp_packet_t *pkt,
 			puts("Skipping...");
 			cbinfo->printstate.skipping = 1;
 		}
-		fwrite(content->unarmoured_text.data, 1,
-		       content->unarmoured_text.length, stdout);
+		if (fwrite(content->unarmoured_text.data, 1,
+		       content->unarmoured_text.length, stdout) != content->unarmoured_text.length) {
+			fprintf(stderr, "unable to write unarmoured text data\n");
+			cbinfo->printstate.skipping = 1;
+		}
 		break;
 
 	case PGP_PTAG_CT_PK_SESSION_KEY:

Reply via email to