Module Name:    src
Committed By:   agc
Date:           Tue Oct  6 02:46:17 UTC 2009

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

Log Message:
Clean up more Flexelint, from phk - many thanks! - just low-hanging fruit
for just now.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 \
    src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.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/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.27 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.28
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.27	Tue Jul  7 01:13:07 2009
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Tue Oct  6 02:46:17 2009
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.27 2009/07/07 01:13:07 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.28 2009/10/06 02:46:17 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -46,10 +46,6 @@
 #include <sys/resource.h>
 #endif
 
-#ifdef HAVE_OPENSSL_CAST_H
-#include <openssl/cast.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -308,17 +304,17 @@
 
 	for (i = 0 ; i < netpgp->c ; i++) {
 		if (netpgp->name[i] != NULL) {
-			(void) free(netpgp->name[i]);
+			free(netpgp->name[i]);
 		}
 		if (netpgp->value[i] != NULL) {
-			(void) free(netpgp->value[i]);
+			free(netpgp->value[i]);
 		}
 	}
 	if (netpgp->name != NULL) {
-		(void) free(netpgp->name);
+		free(netpgp->name);
 	}
 	if (netpgp->value != NULL) {
-		(void) free(netpgp->value);
+		free(netpgp->value);
 	}
 	if (netpgp->pubring != NULL) {
 		__ops_keyring_free(netpgp->pubring);
@@ -326,7 +322,7 @@
 	if (netpgp->secring != NULL) {
 		__ops_keyring_free(netpgp->secring);
 	}
-	(void) free(netpgp->io);
+	free(netpgp->io);
 	return 1;
 }
 
@@ -582,7 +578,7 @@
 			in);
 	} else {
 		(void) fprintf(io->errs,
-"\"%s\": verification failure: %d invalid signatures, %d unknown signatures\n",
+"\"%s\": verification failure: %u invalid signatures, %u unknown signatures\n",
 			in, result.invalidc, result.unknownc);
 	}
 	return 0;
@@ -658,7 +654,7 @@
 	} else {
 		/* replace the element in the array */
 		if (netpgp->value[i]) {
-			(void) free(netpgp->value[i]);
+			free(netpgp->value[i]);
 			netpgp->value[i] = NULL;
 		}
 	}

Reply via email to