#endif // _di_f_capability_mode_get_
#ifndef _di_f_capability_mode_get_name_
- f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name) {
+ f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_mode_get_
#ifndef _di_f_capability_mode_get_name_
- f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name) {
+ f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!mode) return F_status_set_error(F_parameter);
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- name.string = cap_mode_name(mode);
- name.used = strnlen(name.string, F_string_t_size_d);
- name.size = 0;
+ *name = cap_mode_name(mode);
return F_none;
}
* The capability mode.
* @param name
* The name of the mode.
- * This is NULL terminated after the name.used.
+ * This is a NULL terminated string.
*
* @return
* F_none on success.
* @see cap_get_mode()
*/
#ifndef _di_f_capability_mode_get_name_
- extern f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name);
+ extern f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t * const name);
#endif // _di_f_capability_mode_get_name_
/**
void test__f_capability_mode_get_name__works(void **state) {
const f_capability_mode_t mode = f_capability_mode_t_initialize;
- f_string_static_t name = f_string_static_t_initialize;
+ f_string_constant_t name = f_string_constant_t_initialize;
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
printf("[ WARN ] f_capability_mode_get_name() is not implemented and cannot be fully tested.\n");