From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 3/5] mcookie: use same variable type consistently
Date: Sat, 8 Mar 2014 15:43:28 -0600 [thread overview]
Message-ID: <1394315010-22481-3-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1394315010-22481-1-git-send-email-kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
misc-utils/mcookie.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c
index 41f5a0c..9167440 100644
--- a/misc-utils/mcookie.c
+++ b/misc-utils/mcookie.c
@@ -39,9 +39,9 @@ enum {
};
/* The basic function to hash a file */
-static off_t hash_file(struct MD5Context *ctx, int fd)
+static size_t hash_file(struct MD5Context *ctx, int fd)
{
- off_t count = 0;
+ size_t count = 0;
ssize_t r;
unsigned char buf[BUFFERSIZE];
@@ -74,7 +74,7 @@ static void randomness_from_files(char **files, int nfiles,
struct MD5Context *ctx, int verbose)
{
int fd, i;
- int count = 0;
+ size_t count = 0;
for (i = 0; i < nfiles; i++) {
if (files[i][0] == '-' && !files[i][1])
@@ -88,8 +88,8 @@ static void randomness_from_files(char **files, int nfiles,
count = hash_file(ctx, fd);
if (verbose)
fprintf(stderr,
- P_("Got %d byte from %s\n",
- "Got %d bytes from %s\n", count),
+ P_("Got %zu byte from %s\n",
+ "Got %zu bytes from %s\n", count),
count, files[i]);
if (fd != STDIN_FILENO)
--
1.9.0
next prev parent reply other threads:[~2014-03-08 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-08 21:43 [PATCH 1/5] mcookie: use lib/randutils Sami Kerola
2014-03-08 21:43 ` [PATCH 2/5] mcookie: allow --file option be defined multiple times Sami Kerola
2014-03-08 21:43 ` Sami Kerola [this message]
2014-03-08 21:43 ` [PATCH 4/5] mcookie: use control structure, and fix usage() Sami Kerola
2014-03-08 21:43 ` [PATCH 5/5] mcookie: add --max-size option Sami Kerola
2014-03-26 11:12 ` [PATCH 1/5] mcookie: use lib/randutils Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394315010-22481-3-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox