From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QfH71-00076U-9i for garchives@archives.gentoo.org; Fri, 08 Jul 2011 19:53:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BBD821C061; Fri, 8 Jul 2011 19:53:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E4B2421C061 for ; Fri, 8 Jul 2011 19:53:10 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3BE941B4045 for ; Fri, 8 Jul 2011 19:53:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3E0428003D for ; Fri, 8 Jul 2011 19:53:09 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/ X-VCS-Repository: proj/sandbox X-VCS-Files: libsandbox/libsandbox.c X-VCS-Directories: libsandbox/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: bcd3ee28a16cd2a811efcbfd986ebeda9491ed35 Date: Fri, 8 Jul 2011 19:53:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 41b9603e1fc71fb391a6207fe4571e38 commit: bcd3ee28a16cd2a811efcbfd986ebeda9491ed35 Author: Mike Frysinger gentoo org> AuthorDate: Fri Jul 8 19:46:49 2011 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Jul 8 19:46:49 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sandbox.git;a= =3Dcommit;h=3Dbcd3ee28 libsandbox: tweak code to avoid undefined behavior warnings Some gcc versions don't like the construct here where we modified a variable in the middle of multiple checks. Signed-off-by: Mike Frysinger gentoo.org> --- libsandbox/libsandbox.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c index a8929ae..84191d9 100644 --- a/libsandbox/libsandbox.c +++ b/libsandbox/libsandbox.c @@ -1167,7 +1167,7 @@ bool before_syscall_open_char(int dirfd, int sb_nr,= const char *func, const char const char *ext_func; if ((*mode =3D=3D 'r') && ((0 =3D=3D (strcmp(mode, "r"))) || /* The strspn accept args are known non-writable modifiers */ - (strlen(++mode) =3D=3D strspn(mode, "xbtmce")))) + (strlen(mode+1) =3D=3D strspn(mode+1, "xbtmce")))) sb_nr =3D SB_NR_OPEN_RD, ext_func =3D "open_rd"; else sb_nr =3D SB_NR_OPEN_WR, ext_func =3D "open_wr";