X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fcrc.c;h=a67d642d7f56eb29a90626505e7c5a190364cc8b;hb=fd27e50d9f01023121aa5d01fb24d8e7dd39392a;hp=e3132fbef8ba363c929279d288d3ec8a62c2092e;hpb=563da0755fefb7a98f8a4ee4e4de6c8c2b559905;p=gnulib.git diff --git a/lib/crc.c b/lib/crc.c index e3132fbef..a67d642d7 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-2013 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 (0L ^ 0xffffffffL, buf, len) ^ 0xffffffffL; + return crc32_update_no_xor (crc ^ 0xffffffff, buf, len) ^ 0xffffffff; } uint32_t