From patchwork Thu Dec 2 16:30:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 375021 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB2GULF3018792 for ; Thu, 2 Dec 2010 16:30:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757324Ab0LBQaU (ORCPT ); Thu, 2 Dec 2010 11:30:20 -0500 Received: from daytona.panasas.com ([67.152.220.89]:40484 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757143Ab0LBQaU (ORCPT ); Thu, 2 Dec 2010 11:30:20 -0500 Received: from fs1.bhalevy.com ([172.17.33.19]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 2 Dec 2010 11:30:19 -0500 Message-ID: <4CF7C999.4070707@panasas.com> Date: Thu, 02 Dec 2010 18:30:17 +0200 From: Benny Halevy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Thunderbird/3.1.6 MIME-Version: 1.0 To: Jim Rees CC: linux-nfs@vger.kernel.org, peter honeyman Subject: Re: [PATCH] SQUASHME: blkmapd: fix pretty_sig short sig endianess agnosticity References: <4CF7A64D.8040802@panasas.com> <1291300542-14378-1-git-send-email-bhalevy@panasas.com> <20101202162448.GB15055@merit.edu> In-Reply-To: <20101202162448.GB15055@merit.edu> X-OriginalArrivalTime: 02 Dec 2010 16:30:19.0384 (UTC) FILETIME=[3586B780:01CB923E] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Dec 2010 16:30:22 +0000 (UTC) diff --git a/utils/blkmapd/device-process.c b/utils/blkmapd/device-process.c index ea8b8ec..0d8705f 100644 --- a/utils/blkmapd/device-process.c +++ b/utils/blkmapd/device-process.c @@ -58,10 +58,8 @@ static char *pretty_sig(char *sig, uint32_t siglen) int i; sigval = 0; - for (i = 0; i < siglen; i++) { - sigval <<= 8; - sigval += ((unsigned char *)sig)[i]; - } + for (i = 0; i < siglen; i++) + sigval |= ((unsigned char *)sig)[i] << (i * 8); sprintf(rs, "0x%0llx", sigval); } else { if (siglen > sizeof rs - 4) {