From owner-svn-src-stable@FreeBSD.ORG Fri Aug 9 19:45:56 2013 Return-Path: Delivered-To: svn-src-stable@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 ESMTP id 091C2BEE; Fri, 9 Aug 2013 19:45:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D06C42DF1; Fri, 9 Aug 2013 19:45:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r79JjtGE094138; Fri, 9 Aug 2013 19:45:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r79JjtsQ094137; Fri, 9 Aug 2013 19:45:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308091945.r79JjtsQ094137@svn.freebsd.org> From: Marius Strobl Date: Fri, 9 Aug 2013 19:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254158 - stable/9/sys/fs/cd9660 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 19:45:56 -0000 Author: marius Date: Fri Aug 9 19:45:55 2013 New Revision: 254158 URL: http://svnweb.freebsd.org/changeset/base/254158 Log: MFC: r253742 - Add const-qualifiers to the arguments of isonum_*(). - According to ISO 9660 7.1.2, isonum_712() should return a signed value. - Try to get isonum_*() closer to style(9). Modified: stable/9/sys/fs/cd9660/iso.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/cd9660/iso.h ============================================================================== --- stable/9/sys/fs/cd9660/iso.h Fri Aug 9 19:44:19 2013 (r254157) +++ stable/9/sys/fs/cd9660/iso.h Fri Aug 9 19:45:55 2013 (r254158) @@ -291,56 +291,65 @@ u_short sgetrune(const char *, size_t, c */ static __inline uint8_t -isonum_711(unsigned char *p) +isonum_711(const unsigned char *p) { - return p[0]; + + return (p[0]); } -static __inline uint8_t -isonum_712(unsigned char *p) +static __inline int8_t +isonum_712(const unsigned char *p) { - return p[0]; + + return ((signed char)p[0]); } static __inline uint8_t -isonum_713(unsigned char *p) +isonum_713(const unsigned char *p) { - return p[0]; + + return (p[0]); } static __inline uint16_t -isonum_721(unsigned char *p) +isonum_721(const unsigned char *p) { + return (p[0] | p[1] << 8); } static __inline uint16_t -isonum_722(unsigned char *p) +isonum_722(const unsigned char *p) { + return (p[1] | p[0] << 8); } static __inline uint16_t -isonum_723(unsigned char *p) +isonum_723(const unsigned char *p) { + return (p[0] | p[1] << 8); } static __inline uint32_t -isonum_731(unsigned char *p) +isonum_731(const unsigned char *p) { + return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); } static __inline uint32_t -isonum_732(unsigned char *p) +isonum_732(const unsigned char *p) { + return (p[3] | p[2] << 8 | p[1] << 16 | p[0] << 24); } static __inline uint32_t -isonum_733(unsigned char *p) +isonum_733(const unsigned char *p) { + return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); }