summaryrefslogtreecommitdiff
path: root/tests/chksum.c
diff options
context:
space:
mode:
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 14:06:25 +0100
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 14:06:25 +0100
commit79a9578a33ecd3093970bd18df677edc9214fafb (patch)
tree8ae5c6780a1fcd2124e71f27ad9b4256acd24268 /tests/chksum.c
parent1bb1ce141783168d44a38cd1bb6b822eb13114fc (diff)
downloadlzo-79a9578a33ecd3093970bd18df677edc9214fafb.tar.gz
lzo-79a9578a33ecd3093970bd18df677edc9214fafb.tar.bz2
lzo-79a9578a33ecd3093970bd18df677edc9214fafb.zip
Imported Upstream version 2.08upstream/2.08sandbox/kevinthierry/upstream
Diffstat (limited to 'tests/chksum.c')
-rw-r--r--tests/chksum.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/tests/chksum.c b/tests/chksum.c
index 89b6df1..c22afba 100644
--- a/tests/chksum.c
+++ b/tests/chksum.c
@@ -2,19 +2,7 @@
This file is part of the LZO real-time data compression library.
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
The LZO library is free software; you can redistribute it and/or
@@ -52,8 +40,8 @@
int main(int argc, char *argv[])
{
lzo_bytep block;
- lzo_uint block_len;
- lzo_uint32 adler, crc;
+ lzo_uint block_size;
+ lzo_uint32_t adler, crc;
if (argc < 0 && argv == NULL) /* avoid warning about unused args */
return 0;
@@ -65,18 +53,18 @@ int main(int argc, char *argv[])
}
/* prepare the block */
- block_len = 128 * 1024L;
- block = (lzo_bytep) lzo_malloc(block_len);
+ block_size = 128 * 1024L;
+ block = (lzo_bytep) lzo_malloc(block_size);
if (block == NULL)
{
printf("out of memory\n");
return 3;
}
- lzo_memset(block, 0, block_len);
+ lzo_memset(block, 0, block_size);
/* adler32 checksum */
adler = lzo_adler32(0, NULL, 0);
- adler = lzo_adler32(adler, block, block_len);
+ adler = lzo_adler32(adler, block, block_size);
if (adler != 0x001e0001UL)
{
printf("adler32 checksum error !!! (0x%08lx)\n", (long) adler);
@@ -85,7 +73,7 @@ int main(int argc, char *argv[])
/* crc32 checksum */
crc = lzo_crc32(0, NULL, 0);
- crc = lzo_crc32(crc, block, block_len);
+ crc = lzo_crc32(crc, block, block_size);
if (crc != 0x7ee8cdcdUL)
{
printf("crc32 checksum error !!! (0x%08lx)\n", (long) crc);
@@ -98,7 +86,4 @@ int main(int argc, char *argv[])
}
-/*
-vi:ts=4:et
-*/
-
+/* vim:set ts=4 sw=4 et: */