sargon / ddhcpd

A distributed DHCP Daemon
GNU General Public License v3.0
31 stars 11 forks source link

Mark function parameters as nonnull where applicable #62

Closed BenBE closed 4 years ago

BenBE commented 4 years ago

This is an in-depth optimization providing the compiler with information that arguments are assumed non-NULL when a function is called. This allows to skip the checks in the actual source as long as there are proper checks maintained to ensure valid points for all callers. If a caller lacks such a check that call site will be warned of by the compiler.