summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-01-17 12:07:03 +0000
committerBernhard Reutner-Fischer2006-01-17 12:07:03 +0000
commit37dec0e9e9865b307468d4d13bb4bd0d28fffbab (patch)
tree57b224aa329f27984f91da4673faa247913c45ba /libbb
parent0f9ae1a0d71b12a26d54c9cd25b78b6b884e9a05 (diff)
downloadbusybox-37dec0e9e9865b307468d4d13bb4bd0d28fffbab.zip
busybox-37dec0e9e9865b307468d4d13bb4bd0d28fffbab.tar.gz
- make CONFIG_MD5SUM_SIZE_VS_SPEED configurable via menuconfig.
- use shorter boilerplate.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/hash_fd.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/libbb/hash_fd.c b/libbb/hash_fd.c
index 5f12259..3445a25 100644
--- a/libbb/hash_fd.c
+++ b/libbb/hash_fd.c
@@ -5,19 +5,7 @@
* Copyright (C) 2003 Glenn L. McGrath
* Copyright (C) 2003 Erik Andersen
*
- * 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 of the License, 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.
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
#include <byteswap.h>
@@ -271,7 +259,11 @@ static void sha1_end(unsigned char hval[], struct sha1_ctx_t *ctx)
* 3 (smallest) 5.1 4912
*/
+# if CONFIG_MD5SUM_SIZE_VS_SPEED < 0 || CONFIG_MD5SUM_SIZE_VS_SPEED > 3
# define MD5SUM_SIZE_VS_SPEED 2
+# else
+# define MD5SUM_SIZE_VS_SPEED CONFIG_MD5SUM_SIZE_VS_SPEED
+# endif
/* Handle endian-ness */
# if __BYTE_ORDER == __LITTLE_ENDIAN