PERFORCE change 77603 for review
Christian S.J. Peron
csjp at FreeBSD.org
Sat May 28 03:30:12 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=77603
Change 77603 by csjp at csjp_xor on 2005/05/28 03:29:50
Use more consistent variable naming convention: s/shac/ctx
Affected files ...
.. //depot/projects/trustedbsd/mac/usr.sbin/getfhash/getfhash.c#9 edit
Differences ...
==== //depot/projects/trustedbsd/mac/usr.sbin/getfhash/getfhash.c#9 (text+ko) ====
@@ -58,7 +58,7 @@
static int
calc_sha1(const char *fname, u_char *digest)
{
- SHA1_CTX shac;
+ SHA1_CTX ctx;
int fd, len, error, count;
struct stat sb;
off_t b;
@@ -76,7 +76,7 @@
}
len = getpagesize();
buffer = malloc(len);
- SHA1_Init(&shac);
+ SHA1_Init(&ctx);
for (b = 0; b < sb.st_size; b += len) {
if ((len + b) > sb.st_size)
count = sb.st_size - b;
@@ -89,10 +89,10 @@
warn("read failed");
return (error);
}
- SHA1_Update(&shac, buffer, count);
+ SHA1_Update(&ctx, buffer, count);
}
close(fd);
- SHA1_Final(digest, &shac);
+ SHA1_Final(digest, &ctx);
free(buffer);
return (0);
}
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list