X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fcrc.c;h=db998910a0e92be3f625ad2908b902d49d1875a9;hb=4470580881a7b821b52fb5635102ef3e27aa5af4;hp=a1ffbb77ebcf62495b1c8a39d77581e5fad968a4;hpb=cfc51ab90f2f33933de15dd164027c32ebb8b1ac;p=gnulib.git diff --git a/lib/crc.c b/lib/crc.c index a1ffbb77e..db998910a 100644 --- a/lib/crc.c +++ b/lib/crc.c @@ -1,26 +1,22 @@ /* crc.c -- cyclic redundancy checks - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2, or (at - your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ /* Written by Simon Josefsson. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "crc.h" @@ -97,7 +93,7 @@ crc32_no_xor (const char *buf, size_t len) uint32_t crc32_update (uint32_t crc, const char *buf, size_t len) { - return crc32_update_no_xor (crc ^ 0xffffffffL, buf, len) ^ 0xffffffffL; + return crc32_update_no_xor (crc ^ 0xffffffff, buf, len) ^ 0xffffffff; } uint32_t