~ubuntu-branches/ubuntu/trusty/libssh/trusty-security

« back to all changes in this revision

Viewing changes to libssh/crc32.c

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-12-12 14:29:12 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091212142912-ha5g2iibt6nfnjq8
Tags: 0.4.0-1
* New upstream release.
  - Bump soname
  - Adjust .symbols file
* Readd static library in -dev package
* Let dh_lintian install override file
* debian/README.Debian: Update file
* debian/rules: Add list-missing rule

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "libssh/priv.h"
25
25
 
26
 
static u32 crc_table[] = {
 
26
static uint32_t crc_table[] = {
27
27
  0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
28
28
  0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
29
29
  0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
78
78
  0x2d02ef8dUL
79
79
};
80
80
 
81
 
u32 ssh_crc32(const char *buf, u32 len) {
82
 
  u32 ret = 0;
 
81
uint32_t ssh_crc32(const char *buf, uint32_t len) {
 
82
  uint32_t ret = 0;
83
83
  while(len > 0) {
84
84
    ret = crc_table[(ret ^ *buf) & 0xff] ^ (ret >> 8);
85
85
    --len;