From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:16:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32E4BCA9; Fri, 24 Jan 2014 15:16:01 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id DB2AE1659; Fri, 24 Jan 2014 15:16:00 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id F20B317FCA0; Fri, 24 Jan 2014 16:15:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 6EF9C160BDB; Fri, 24 Jan 2014 16:16:49 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nqONWgxXdPMy; Fri, 24 Jan 2014 16:16:48 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 90739160BDA; Fri, 24 Jan 2014 16:16:48 +0100 (CET) Message-ID: <52E283EA.1050708@bitfrost.no> Date: Fri, 24 Jan 2014 16:16:58 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2014 15:16:01 -0000 On 01/24/14 16:11, Adrian Chadd wrote: > ... How's that matter? > > Adrian Ok, read slowly: uint32_t x = 255U; uint8_t y; On Big endian: memcpy(&y, &x, 1); y == 0; On Little endian: memcpy(&y, &x, 1); y == 255; If I'm not mistaken. The code is wrong because result depends on endianness :-) --HPS