Skip to content
Snippets Groups Projects
Verified Commit ead0fed0 authored by Oto Šťáva's avatar Oto Šťáva
Browse files

daemon: use __attribute__((constructor)) for protolayer_globals

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.
parent baacbea7
No related branches found
No related tags found
1 merge request!1559daemon: use __attribute__((constructor)) for protolayer_globals
Pipeline #126827 waiting for manual action
Pipeline: Knot Resolver

#126828

    Loading
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment