nmbs_client_create accepts a const nmbs_platform_conf* platform_conf with configuration. Without reading the source code, it is not clear whether or not the object pointed to by platform_conf can be declared on the stack, or if it needs to be kept alive for the duration of the program (as would be the case if the implementation simply kept a pointer to the configuration instead of copying it by value). This PR adds an assurance that it is OK to discard the platform configuration after calling nmbs_client_create. Same idea for nmbs_server_create.
nmbs_client_create
accepts aconst nmbs_platform_conf* platform_conf
with configuration. Without reading the source code, it is not clear whether or not the object pointed to byplatform_conf
can be declared on the stack, or if it needs to be kept alive for the duration of the program (as would be the case if the implementation simply kept a pointer to the configuration instead of copying it by value). This PR adds an assurance that it is OK to discard the platform configuration after callingnmbs_client_create
. Same idea fornmbs_server_create
.