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 Get rid of some lint...
details: https://anonhg.NetBSD.org/src/rev/d7df870b22e9
branches: trunk
changeset: 747889:d7df870b22e9
user: agc <agc%NetBSD.org@localhost>
date: Sun Oct 04 21:58:25 2009 +0000
description:
Get rid of some lint-style issues - pointed out by Poul-Henning Kamp
and FlexeLint (many thanks!)
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/compress.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r 4add659ad071 -r d7df870b22e9 crypto/external/bsd/netpgp/dist/src/lib/compress.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/compress.c Sun Oct 04 21:57:09 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/compress.c Sun Oct 04 21:58:25 2009 +0000
@@ -57,7 +57,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: compress.c,v 1.12 2009/06/09 00:51:01 agc Exp $");
+__RCSID("$NetBSD: compress.c,v 1.13 2009/10/04 21:58:25 agc Exp $");
#endif
#ifdef HAVE_ZLIB_H
@@ -191,7 +191,7 @@
(void) fprintf(stderr, "Out of memory in buffer\n");
return 0;
}
- len = z->zstream.next_out - &z->out[z->offset];
+ len = (size_t)(z->zstream.next_out - &z->out[z->offset]);
if (len > length) {
len = length;
}
@@ -275,7 +275,7 @@
(void) fprintf(stderr, "Out of bz memroy\n");
return 0;
}
- len = bz->bzstream.next_out - &bz->out[bz->offset];
+ len = (size_t)(bz->bzstream.next_out - &bz->out[bz->offset]);
if (len > length) {
len = length;
}
@@ -417,8 +417,8 @@
__ops_output_t *out)
{
compress_t *zip = calloc(1, sizeof(compress_t));
- size_t sz_in = 0;
- size_t sz_out = 0;
+ size_t sz_in;
+ size_t sz_out;
int r = 0;
/* compress the data */
@@ -442,7 +442,7 @@
}
sz_in = len * sizeof(unsigned char);
- sz_out = (sz_in * 1.01) + 12; /* from zlib webpage */
+ sz_out = ((101 * sz_in) / 100) + 12; /* from zlib webpage */
zip->src = calloc(1, sz_in);
zip->dst = calloc(1, sz_out);
(void) memcpy(zip->src, data, len);
Home |
Main Index |
Thread Index |
Old Index