Re: [hackers] [dwm][PATCH] applyrules: read rules[] with the `r` pointer directly

From: NRK <nrk_AT_disroot.org>
Date: Tue, 30 Aug 2022 19:49:22 +0600

On Mon, Aug 29, 2022 at 05:49:06PM -0500, explosion0mental_AT_gmail.com wrote:
> + for (r = &rules[0]; r <= &rules[LENGTH(rules) - 1]; r++) {

The `&a[n]` construct always looks silly to me; it could've simply been
`a + n`:

        for (r = rules + 0; r < rules + LENGTH(rules); ++r)

And `+ 0` is oviously retarded so after removing that you get this,
which is much cleaner and noise free:

        for (r = rules; r < rules + LENGTH(rules); ++r)

- NRK
Received on Tue Aug 30 2022 - 15:49:22 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 30 2022 - 16:00:39 CEST