From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A00DE138334 for ; Thu, 7 Jun 2018 14:09:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E332E0AE0; Thu, 7 Jun 2018 14:09:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52E94E0AE0 for ; Thu, 7 Jun 2018 14:09:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A54FD335C97 for ; Thu, 7 Jun 2018 14:09:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21A132CA for ; Thu, 7 Jun 2018 14:09:41 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1528380349.6d18d3218193e1d34e8a7efb075465babc50d7a2.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: paxelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 6d18d3218193e1d34e8a7efb075465babc50d7a2 X-VCS-Branch: master Date: Thu, 7 Jun 2018 14:09:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 10f20769-72f8-4fd0-a00c-3b9cb8b19f64 X-Archives-Hash: d8c888d5a300093d74e7108ef3aeff34 commit: 6d18d3218193e1d34e8a7efb075465babc50d7a2 Author: Mike Frysinger gentoo org> AuthorDate: Fri Mar 3 21:31:54 2017 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Jun 7 14:05:49 2018 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=6d18d321 paxelf: constify misc pointers Mark internal pointers as const that we don't modify anywhere. paxelf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paxelf.c b/paxelf.c index 913c6a5..9609cc1 100644 --- a/paxelf.c +++ b/paxelf.c @@ -616,7 +616,7 @@ free_elf_and_return: #define READELF_HEADER(B) \ if (elf->elf_class == ELFCLASS ## B) { \ char invalid; \ - Elf ## B ## _Ehdr *ehdr = EHDR ## B (elf->ehdr); \ + const Elf ## B ## _Ehdr *ehdr = EHDR ## B (elf->ehdr); \ Elf ## B ## _Off size; \ /* verify program header */ \ invalid = 0; \ @@ -794,9 +794,9 @@ const void *elf_findsecbyname(elfobj *elf, const char *name) #define FINDSEC(B) \ if (elf->elf_class == ELFCLASS ## B) { \ - Elf ## B ## _Ehdr *ehdr = EHDR ## B (elf->ehdr); \ - Elf ## B ## _Shdr *shdr = SHDR ## B (elf->shdr); \ - Elf ## B ## _Shdr *strtbl; \ + const Elf ## B ## _Ehdr *ehdr = EHDR ## B (elf->ehdr); \ + const Elf ## B ## _Shdr *shdr = SHDR ## B (elf->shdr); \ + const Elf ## B ## _Shdr *strtbl; \ Elf ## B ## _Off offset; \ uint16_t shstrndx = EGET(ehdr->e_shstrndx); \ uint16_t shnum = EGET(ehdr->e_shnum); \