@sschuberth credential_read also called from other modules, not only credential.c. Therefore your proposition would not work