Skip to content
Snippets Groups Projects
  • Oto Šťáva's avatar
    daemon: use __attribute__((constructor)) for protolayer_globals · ead0fed0
    Oto Šťáva authored
    The `protolayer_globals` array can basically be treated as a constant by
    most of the program and its initialization only uses compile-time-known
    values.  We basically only initialize parts of the array in different
    files throughout the codebase to maintain separation of concerns, so
    that each piece of Knot Resolver initializes the part that pertains to
    it.  Therefore, I believe that it is more ergonomic to just use
    `__attribute__((constructor))` for these functions, so as not to pollute
    `daemon/main.c` with these calls.
    Verified
    ead0fed0