From owner-svn-src-all@FreeBSD.ORG Fri Jan 24 15:19:07 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 AA32BEAF; Fri, 24 Jan 2014 15:19:07 +0000 (UTC) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3250216C8; Fri, 24 Jan 2014 15:19:07 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id w7so4566562qcr.14 for ; Fri, 24 Jan 2014 07:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L/RFRD8QnJ88B3wRr1hTcfyvFF18EH7KOMQ4gPzV2S0=; b=PyToNWv1ikpp9Q91L/utzD2jS/4ouvjhEmnRQIbj3YDq4llnZHTkY3VEljbevV1ylX fmdlF0/BRLlCJ/5F2maCJ7mp7cg1Pz2ROkplqlEWA3o3yTKhrePq6HO1Iknlv5xuitvW mhj/SFT5PMIRXnp0i/iGQtUpAvUBSh3KMdjrILICPIyshSHKOOHxEZvgvDrA0EWBi6Q4 pc8AEaRMJBaKgaz7GhO00YrjcYSu69ThPdxY2bftSsJuIdT7C5CAQ1v0zi0Yh46NltXn bXzHwsj47Ffil1GSX6EhgyFAk3KYeHtrLZ8HV8jvkmyU2E+OWhWI4amsRYyUt1tib06v F9fg== MIME-Version: 1.0 X-Received: by 10.224.122.208 with SMTP id m16mr21372343qar.55.1390576746283; Fri, 24 Jan 2014 07:19:06 -0800 (PST) Received: by 10.224.52.8 with HTTP; Fri, 24 Jan 2014 07:19:06 -0800 (PST) In-Reply-To: <52E283EA.1050708@bitfrost.no> References: <201401240917.s0O9HTBO046991@svn.freebsd.org> <52E279FD.70909@bitfrost.no> <52E283EA.1050708@bitfrost.no> Date: Fri, 24 Jan 2014 07:19:06 -0800 Message-ID: Subject: Re: svn commit: r261118 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 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:19:07 -0000 On 24 January 2014 07:16, Hans Petter Selasky wrote: > 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 > :-) Right. But that has nothing to do with the memory copy operation. That has to do with how its stored. So again - how's memmove() not portable here? :) -a