From nobody Wed Sep 18 20:54:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X89qt3Qv4z52Mx9; Wed, 18 Sep 2024 20:54:18 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4X89qt0b9Jz4xWG; Wed, 18 Sep 2024 20:54:18 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=citron; t=1726692849; x=1727359515; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: author:from:subject:date:to:cc:resent-author:resent-date:resent-from: resent-sender:resent-to:resent-cc:resent-reply-to:resent-message-id: in-reply-to:references:mime-version:content-type: content-transfer-encoding:content-disposition:content-id: content-description:message-id:mail-followup-to:openpgp:blahblahblah; bh=562pfqT0mwNfmp5kWUcklCQ+C58h4obAUwoHUKsyyyE=; b=EMlhce26RQ+dnSZwuJhEVLWOafhpntfCFgq3rYGvDSEvcupPCvVct6RnxkM4hafoUfFNEDnq K6gjbLH1+8b7A0SGllT0tgLdRfxuc0A8Uo2SfeXzbKEhI9IkAm0M2rOCeFqaUMAxpRYWeZZ35B h5uhEuUhalJ97esLMRrc6d2AYVd0ha/pqN4inqrPXedPc3TWs4JZOpSCHbucnP/VVxNfU4DqP7 qBcO8YM3iPeCKK/nJjmAtN9iBseo+NQTZaQXT24rk0be6//infxk5TJfXj22LEJWaBZkh8H8WD CWE2CuJgEXMamOXIPyC8UK5J6tuJspL3+oOf0kinmYE32/pA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=orange; t=1726692849; x=1727359515; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: author:from:subject:date:to:cc:resent-author:resent-date:resent-from: resent-sender:resent-to:resent-cc:resent-reply-to:resent-message-id: in-reply-to:references:mime-version:content-type: content-transfer-encoding:content-disposition:content-id: content-description:message-id:mail-followup-to:openpgp:blahblahblah; bh=562pfqT0mwNfmp5kWUcklCQ+C58h4obAUwoHUKsyyyE=; b=6Dm3/oblu0ds+zQtrmUcz4hFxDY5TU0ZmABIYKWuuMo44uI3cT5OIxLRbbd/verGi6COILac vLywJJXrUmvhAg== Date: Wed, 18 Sep 2024 22:54:08 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: "Stephen J. Kiernan" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ce9c3abf69c2 - main - config: Search include paths for files to be read (options, files) Message-ID: <20240918205408.TbriDa0K@steffen%sdaoden.eu> In-Reply-To: <202409181954.48IJsBgL047458@gitrepo.freebsd.org> References: <202409181954.48IJsBgL047458@gitrepo.freebsd.org> Mail-Followup-To: "Stephen J. Kiernan" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.25-608-ge479530e8d OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE] X-Rspamd-Queue-Id: 4X89qt0b9Jz4xWG X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Hello. Stephen J. Kiernan wrote in <202409181954.48IJsBgL047458@gitrepo.freebsd.org>: ... |URL: https://cgit.FreeBSD.org/src/commit/?id=ce9c3abf69c2044c1aab0aa62e4\ |a73f8eb13d787 | |commit ce9c3abf69c2044c1aab0aa62e4a73f8eb13d787 |Author: Stephen J. Kiernan |AuthorDate: 2024-09-18 19:49:46 +0000 |Commit: Stephen J. Kiernan |CommitDate: 2024-09-18 19:49:46 +0000 | | config: Search include paths for files to be read (options, files) | | This is useful for downstream consumers to add their own kernel config | files in another directory other than the default ones. | | Obtained from: Juniper Networks, Inc. | Differential Revision: https://reviews.freebsd.org/D44538 ... |- char *rfile, *compilewith, *depends, *clean, *warning; |+ char *rfile, *compilewith, *depends, *clean, *fnamebuf, *warning; ^fnamebuf is new ... |+ asprintf(&fnamebuf, "%s/%s", ipath->path, fname); |+ if (fnamebuf != NULL) { |+ fp = fopen(fnamebuf, "r"); |+ if (fp != NULL) |+ break; ^ and surely leaked in case the fopen(3) succeeds. Given the reviewers of the patch however i would assume it does not really hurt. |+ free(fnamebuf); |+ } |+ } |+ } | if (fp == NULL) | err(1, "%s", fname); Having said that. Why is that file marked .cc aka C++? This is so pure basic C Mr. Somers surely gets goose pimples, and then comes back complaining that a memory safe language would not have had this problem. File pointer, asprintf (horrors!), lots of char pointers, SLIST_FOREACH() not some object encapsulating possible difficulties, and what not. In short -- this changeset is surely meant to buy Rust some buffalo nickels, and whereas some maybe smile, the Rust gets armored steel .. and in the end we have to use this merde (imho). --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)