Re: [PATCH v5 03/10] daemon: rename some esoteric/laboured terminology
- From
Victoria Dye <vdye@github.com>
- Date
- Jan 12, 2023, 19:44 UTC
- Message-ID
- <da31180a-5beb-4f0e-667b-ddceba941e9f@github.com>
- In-Reply-To
- <8f176d5955dfc83616a39622972aaa71a71f5599.1673475190.git.gitgitgadget@gmail.com>
Matthew John Cheetham via GitGitGadget wrote:
Show 8 quoted lines
> From: Matthew John Cheetham <mjcheetham@outlook.com> > > Rename some of the variables and function arguments used to manage child > processes. The existing names are esoteric; stretching an analogy too > far to the point of being confusing to understand. > > Rename "firstborn" to simply "first", "newborn" to "new_cld", "blanket" > to "current" and "cradle" to "ptr".
Thanks for this, I agree that the new names make the code much easier to read.
Show 10 quoted lines
> diff --git a/daemon.c b/daemon.c > index ec3b407ecbc..d3e7d81de18 100644 > --- a/daemon.c > +++ b/daemon.c > @@ -789,7 +789,7 @@ static int max_connections = 32; > > static unsigned int live_children; > > -static struct child *firstborn; > +static struct child *first_child;
minor nit: you changed "firstborn" to "first" in 'daemon-utils.c' (aligning with the commit message), but it's "first_child" here. If you end up re-rolling, it would be nice to make the names consistent across both files (could be 'first', 'first_child', 'first_cld', or anything really).