Re: [PATCH 02/41] server-info: remove unused members from struct pack_info
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Apr 24, 2018, 09:41 UTC
- Message-ID
- <CAN0heSroUKRz_gZSTbXxO0jkB-WWd45aykpjASrWt8aB=q0iPw@mail.gmail.com>
- In-Reply-To
- <20180423233951.276447-3-sandals@crustytoothpaste.net>
On 24 April 2018 at 01:39, brian m. carlson <sandals@crustytoothpaste.net> wrote:
> The head member of struct pack_info is completely unused and the > nr_heads member is used only in one place, which is an assignment. > Since these structure members are not useful, remove them.
Good catch.
Show 7 quoted lines
> @@ -228,7 +226,6 @@ static void init_pack_info(const char *infofile, int force)
> for (i = 0; i < num_pack; i++) {
> if (stale) {
> info[i]->old_num = -1;
> - info[i]->nr_heads = 0;
> }
> }Minor nits: The braces could go. Not something you're introducing, but the nesting of the `for` and the `if` looks odd. There used to be more inside this loop, which explains this.
Martin