]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mcookie: use same variable type consistently
authorSami Kerola <kerolasa@iki.fi>
Sat, 8 Mar 2014 21:43:28 +0000 (15:43 -0600)
committerKarel Zak <kzak@redhat.com>
Wed, 26 Mar 2014 09:36:18 +0000 (10:36 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/mcookie.c

index 9bfa9759cb6bf1a99580c9d15d9468ed5cd2efda..3f94034053f21acc67b77e2a4e860ee45ba605ea 100644 (file)
@@ -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)