From: Nicolas Pitre Date: Sat, 12 Nov 2005 23:47:20 +0000 (+1100) Subject: [CRYPTO] sha1: Avoid useless memcpy() X-Git-Tag: v2.6.16-rc1~658^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfa8d17cc836905ad174fd924701b352585d62f1;p=pandora-kernel.git [CRYPTO] sha1: Avoid useless memcpy() The current code unconditionally copy the first block for every call to sha1_update(). This can be avoided if there is no pending partial block. This is always the case on the first call to sha1_update() (if the length is >= 64 of course. Furthermore, temp does need to be called if sha_transform is never invoked. Also consolidate the sha_transform calls into one to reduce code size. Signed-off-by: Nicolas Pitre Signed-off-by: Herbert Xu --- Reading git-diff-tree failed