Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib Clean up more Flexel...



details:   https://anonhg.NetBSD.org/src/rev/6d67385a9c16
branches:  trunk
changeset: 747935:6d67385a9c16
user:      agc <agc%NetBSD.org@localhost>
date:      Tue Oct 06 02:46:17 2009 +0000

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

diffstat:

 crypto/external/bsd/netpgp/dist/src/lib/netpgp.c |  20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diffs (72 lines):

diff -r 7eb21f4f19af -r 6d67385a9c16 crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c  Tue Oct 06 02:39:53 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c  Tue Oct 06 02:46:17 2009 +0000
@@ -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;
                }
        }



Home | Main Index | Thread Index | Old Index