]> git.ipfire.org Git - thirdparty/git.git/commit - daemon.c
daemon.c: refactor hostinfo_init() to HOSTINFO_INIT macro
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 27 Sep 2021 12:58:41 +0000 (14:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Sep 2021 22:02:32 +0000 (15:02 -0700)
commit6e54a32468e209aa724b37496fcc63f4ebe84f60
tree8820ae3a54e35f24c0a59c9ad6184af591414e77
parenta30321b9eaede5a1d639936d212e2d0fc8d414c8
daemon.c: refactor hostinfo_init() to HOSTINFO_INIT macro

Remove the hostinfo_init() function added in 01cec54e135 (daemon:
deglobalize hostname information, 2015-03-07) and instead initialize
the "struct hostinfo" with a macro.

This is the more idiomatic pattern in the codebase, and doesn't leave
us wondering when we see the *_init() function if this struct needs
more complex initialization than a macro can provide.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c