From owner-dev-commits-src-main@freebsd.org Wed Mar 24 22:40:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9980357987F; Wed, 24 Mar 2021 22:40:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F5NVL3w6wz3LZ9; Wed, 24 Mar 2021 22:40:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7544E1C21B; Wed, 24 Mar 2021 22:40:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12OMeQJK089958; Wed, 24 Mar 2021 22:40:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12OMeQGC089957; Wed, 24 Mar 2021 22:40:26 GMT (envelope-from git) Date: Wed, 24 Mar 2021 22:40:26 GMT Message-Id: <202103242240.12OMeQGC089957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 852a88a1d925 - main - rtld: style nits MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 852a88a1d92500028f1364a4afc58955190db7a5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 22:40:26 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=852a88a1d92500028f1364a4afc58955190db7a5 commit 852a88a1d92500028f1364a4afc58955190db7a5 Author: Mariusz Zaborski AuthorDate: 2021-03-24 21:05:39 +0000 Commit: Mariusz Zaborski CommitDate: 2021-03-24 22:40:48 +0000 rtld: style nits No functional change intended. Requested by: kib --- libexec/rtld-elf/rtld.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index b186bebbfefc..3ecf50b8cf5d 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2470,30 +2470,31 @@ load_needed_objects(Obj_Entry *first, int flags) static int load_preload_objects(void) { - char *p = ld_preload; - Obj_Entry *obj; - static const char delim[] = " \t:;"; - - if (p == NULL) - return 0; + char *p = ld_preload; + Obj_Entry *obj; + static const char delim[] = " \t:;"; - p += strspn(p, delim); - while (*p != '\0') { - size_t len = strcspn(p, delim); - char savech; + if (p == NULL) + return (0); - savech = p[len]; - p[len] = '\0'; - obj = load_object(p, -1, NULL, 0); - if (obj == NULL) - return -1; /* XXX - cleanup */ - obj->z_interpose = true; - p[len] = savech; - p += len; p += strspn(p, delim); - } - LD_UTRACE(UTRACE_PRELOAD_FINISHED, NULL, NULL, 0, 0, NULL); - return 0; + while (*p != '\0') { + size_t len = strcspn(p, delim); + char savech; + + savech = p[len]; + p[len] = '\0'; + obj = load_object(p, -1, NULL, 0); + if (obj == NULL) + return (-1); /* XXX - cleanup */ + obj->z_interpose = true; + p[len] = savech; + p += len; + p += strspn(p, delim); + } + LD_UTRACE(UTRACE_PRELOAD_FINISHED, NULL, NULL, 0, 0, NULL); + + return (0); } static const char *