diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-22 01:43:59 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-22 01:43:59 +0000 |
commit | 46c162204b5a6f7471525c2f75cb2c607c88b83f (patch) | |
tree | 9041b006ab612c18bdb16b606601839a00ca5b2c /crc32.c | |
parent | a074feb65d6f1fcad02e80b751e2287fd6230b09 (diff) |
One way to massive patch. <sigh> It compiles and works under Linux..
And I think I have all the bits right from the OpenBSD tree.
20001222
- Updated RCSID for pty.c
- (bal) OpenBSD CVS Updates:
- markus@cvs.openbsd.org 2000/12/21 15:10:16
[auth-rh-rsa.c hostfile.c hostfile.h sshconnect.c]
print keyfile:line for changed hostkeys, for deraadt@, ok deraadt@
- markus@cvs.openbsd.org 2000/12/20 19:26:56
[authfile.c]
allow ssh -i userkey for root
- markus@cvs.openbsd.org 2000/12/20 19:37:21
[authfd.c authfd.h kex.c sshconnect2.c sshd.c uidswap.c uidswap.h]
fix prototypes; from stevesk@pobox.com
- markus@cvs.openbsd.org 2000/12/20 19:32:08
[sshd.c]
init pointer to NULL; report from Jan.Ivan@cern.ch
- markus@cvs.openbsd.org 2000/12/19 23:17:54
[auth-krb4.c auth-options.c auth-options.h auth-rhosts.c auth-rsa.c
auth1.c auth2-skey.c auth2.c authfd.c authfd.h authfile.c bufaux.c
bufaux.h buffer.c canohost.c channels.c clientloop.c compress.c
crc32.c deattack.c getput.h hmac.c hmac.h hostfile.c kex.c kex.h
key.c key.h log.c login.c match.c match.h mpaux.c mpaux.h packet.c
packet.h radix.c readconf.c rsa.c scp.c servconf.c servconf.h
serverloop.c session.c sftp-server.c ssh-agent.c ssh-dss.c ssh-dss.h
ssh-keygen.c ssh-keyscan.c ssh-rsa.c ssh-rsa.h ssh.c ssh.h uuencode.c
uuencode.h sshconnect1.c sshconnect2.c sshd.c tildexpand.c]
replace 'unsigned bla' with 'u_bla' everywhere. also replace 'char
unsigned' with u_char.
Diffstat (limited to 'crc32.c')
-rw-r--r-- | crc32.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -31,7 +31,7 @@ | |||
31 | * tions for all combinations of data and CRC register values | 31 | * tions for all combinations of data and CRC register values |
32 | * | 32 | * |
33 | * The values must be right-shifted by eight bits by the "updcrc | 33 | * The values must be right-shifted by eight bits by the "updcrc |
34 | * logic; the shift must be unsigned (bring in zeroes). On some | 34 | * logic; the shift must be u_(bring in zeroes). On some |
35 | * hardware you could probably optimize the shift in assembler by | 35 | * hardware you could probably optimize the shift in assembler by |
36 | * using byte-swap instructions | 36 | * using byte-swap instructions |
37 | * polynomial $edb88320 | 37 | * polynomial $edb88320 |
@@ -39,11 +39,11 @@ | |||
39 | 39 | ||
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: crc32.c,v 1.7 2000/09/07 20:27:51 deraadt Exp $"); | 42 | RCSID("$OpenBSD: crc32.c,v 1.8 2000/12/19 23:17:56 markus Exp $"); |
43 | 43 | ||
44 | #include "crc32.h" | 44 | #include "crc32.h" |
45 | 45 | ||
46 | static unsigned int crc32_tab[] = { | 46 | static u_int crc32_tab[] = { |
47 | 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, | 47 | 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, |
48 | 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, | 48 | 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, |
49 | 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, | 49 | 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, |
@@ -100,11 +100,11 @@ static unsigned int crc32_tab[] = { | |||
100 | 100 | ||
101 | /* Return a 32-bit CRC of the contents of the buffer. */ | 101 | /* Return a 32-bit CRC of the contents of the buffer. */ |
102 | 102 | ||
103 | unsigned int | 103 | u_int |
104 | ssh_crc32(const unsigned char *s, unsigned int len) | 104 | ssh_crc32(const u_char *s, u_int len) |
105 | { | 105 | { |
106 | unsigned int i; | 106 | u_int i; |
107 | unsigned int crc32val; | 107 | u_int crc32val; |
108 | 108 | ||
109 | crc32val = 0; | 109 | crc32val = 0; |
110 | for (i = 0; i < len; i ++) { | 110 | for (i = 0; i < len; i ++) { |