From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 20142 invoked from network); 24 Mar 2020 02:35:30 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 24 Mar 2020 02:35:30 -0000 Received: (qmail 26370 invoked by alias); 24 Mar 2020 02:35:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45611 Received: (qmail 10190 invoked by uid 1010); 24 Mar 2020 02:35:21 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 0.7264 secs); 24 Mar 2020 02:35:21 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudegledggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddukedurdeluddrhedtnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Tue, 24 Mar 2020 02:34:43 +0000 From: Daniel Shahaf To: Jun T Cc: zsh-workers@zsh.org Subject: Re: [PATCH] find RLIM_NLIMITS correctly on Cygwin Message-ID: <20200324023443.0eaf4f03@tarpaulin.shahaf.local2> In-Reply-To: References: <82F8CDE0-C95C-4D31-ABFC-EBB3C97799F3@kba.biglobe.ne.jp> <1B509B1C-A670-482F-9D88-2145E15D03A1@kba.biglobe.ne.jp> <20200109131553.hqetnd45sc43z6xb@tarpaulin.shahaf.local2> <087AE8B9-35B0-4258-9626-AACA85471A07@kba.biglobe.ne.jp> <20200111201549.GA1264@tarpaulin.shahaf.local2> <3340070A-53DD-40F0-8363-A8C7D84702D3@kba.biglobe.ne.jp> <374cecf6-45d5-4688-861f-cc52017dbcea@www.fastmail.com> <321F9465-ABF9-465D-9242-7EF9A0EDDBED@kba.biglobe.ne.jp> <20200320191846.3a4f5682@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jun T wrote on Mon, 23 Mar 2020 14:41 +0900: > Changes to the data in known_resouces is done via the pointer current_let= ter: > char *current_letter =3D &known_resources[i].opt; > Constness of resinfo does not interfere with this. Right. > # and the data for unknown resource (if any) is setup using the pointer > # resinfo_T *info =3D (resinfo_T *)zshcalloc(sizeof(resinfo_T)); > # and the assignment "resinfo[i] =3D info" does not conflict with the > # constness of resinfo. I agree about the assignment, but that allocation won't run for the case at hand, will it? In the second for loop, =C2=ABresinfo[i]=C2=BB (in the '= if' condition) will be non-NULL; it will point to an element of =C2=ABknown_resources=C2=BB whose =C2=ABopt=C2=BB member will have been cha= nged to 'N' by the first for loop. > Using resinfo instead of resinfo_mutable gives no warning for me > (gcc on Linux and clang on macOS). >=20 > Do we really need resinfo_mutable? I guess not. That must be a relic from an earlier draft of that patch. I will fix it if we decide to add the runtime verification. Thanks for the review. :-) Cheers, Daniel