From 02d1614c7263ba547df253e7e7885174b843a5c9 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 17 Apr 2022 21:44:54 -0400 Subject: clean up some cruft from cksum --- sum.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'sum.c') diff --git a/sum.c b/sum.c index 08f510f..ec38012 100644 --- a/sum.c +++ b/sum.c @@ -27,8 +27,6 @@ #include #include -#define MAX_SUM_WIDTH (32) -#define UINT32_BIT (32) #define UINT16_BIT (16) #define BLOCK_SIZE (512) @@ -39,18 +37,6 @@ struct sum { uintmax_t sum; }; -static char *progname = NULL; - -static uint32_t reverse(uint32_t n, int width) -{ - uint32_t r = 0; - for (int i = 0; i < width; i++) { - r |= (n & 0x1) << ((width - 1) - i); - n >>= 1; - } - return r; -} - static struct sum sum_obsolete(FILE *f, int alt) { struct sum sum = { 0 }; @@ -100,7 +86,7 @@ int cksum(const char *path, enum algorithm alg) } if (f == NULL) { - fprintf(stderr, "%s: %s: %s\n", progname, path, strerror(errno)); + fprintf(stderr, "sum: %s: %s\n", path, strerror(errno)); return 1; } -- cgit v1.2.1