usr.bin/cksum: localize _total variables.

This commit is contained in:
Xin LI 2022-07-17 17:24:31 -07:00
parent 46eab86035
commit 1fbfa7a8dc
3 changed files with 2 additions and 5 deletions

View file

@ -108,7 +108,7 @@ static const uint32_t crctab[] = {
* locations to store the crc and the number of bytes read. It returns 0 on
* success and 1 on failure. Errno is set on failure.
*/
uint32_t crc_total = ~0; /* The crc over a number of files. */
static uint32_t crc_total = ~0; /* The crc over a number of files. */
int
crc(int fd, uint32_t *cval, off_t *clen)

View file

@ -95,7 +95,7 @@ static const uint32_t crctab[256] = {
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
uint32_t crc32_total = 0;
static uint32_t crc32_total = 0;
int
crc32(int fd, uint32_t *cval, off_t *clen)

View file

@ -34,9 +34,6 @@
#include <sys/cdefs.h>
extern uint32_t crc_total;
extern uint32_t crc32_total;
__BEGIN_DECLS
int crc(int, uint32_t *, off_t *);
void pcrc(char *, uint32_t, off_t);