From: Kevin Day Date: Sun, 20 Feb 2022 06:48:32 +0000 (-0600) Subject: Update: Make sure constant pointers that are intended to be read-only are just that. X-Git-Tag: 0.5.8~15 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=cc4170426ac31eb5703cc5d7b22ffc3b2519a11d;p=fll Update: Make sure constant pointers that are intended to be read-only are just that. I often read "const char *name" as a constant pointer. This is strictly incorrect. This actual means that this is a pointer to a constant character. Mass change the pointers to constants that are intended to be themselves constant. This is changed via a regex and test to compile and run. I'm not sure if there are any problems with this change but everything seems fine. This new code looks more awkward but is strictly correct. Now "const char * const name" represents a constant pointer to a constant string. This makes the parameter a constant and still allows for the pointer to point to a constant variable. --- diff --git a/level_0/f_account/tests/unit/c/mock-account.c b/level_0/f_account/tests/unit/c/mock-account.c index 5747383..caf13cc 100644 --- a/level_0/f_account/tests/unit/c/mock-account.c +++ b/level_0/f_account/tests/unit/c/mock-account.c @@ -4,7 +4,7 @@ extern "C" { #endif -int __wrap_getpwnam_r(const char *name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result) { +int __wrap_getpwnam_r(const char * const name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result) { const bool failure = mock_type(bool); @@ -36,7 +36,7 @@ int __wrap_getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, s return 0; } -int __wrap_getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen, struct group **result) { +int __wrap_getgrnam_r(const char * const name, struct group *grp, char *buf, size_t buflen, struct group **result) { const bool failure = mock_type(bool); diff --git a/level_0/f_account/tests/unit/c/mock-account.h b/level_0/f_account/tests/unit/c/mock-account.h index 5096422..6ffcadd 100644 --- a/level_0/f_account/tests/unit/c/mock-account.h +++ b/level_0/f_account/tests/unit/c/mock-account.h @@ -28,10 +28,10 @@ extern "C" { const static int mock_errno_generic = 32767; -extern int __wrap_getpwnam_r(const char *name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result); +extern int __wrap_getpwnam_r(const char * const name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result); extern int __wrap_getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result); extern int __wrap_getgrgid_r(uid_t uid, struct group *grp, char *buf, size_t buflen, struct group **result); -extern int __wrap_getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen, struct group **result); +extern int __wrap_getgrnam_r(const char * const name, struct group *grp, char *buf, size_t buflen, struct group **result); extern long __wrap_sysconf(int name); #ifdef __cplusplus diff --git a/level_0/f_capability/c/capability.c b/level_0/f_capability/c/capability.c index 2240ca4..6e8fa33 100644 --- a/level_0/f_capability/c/capability.c +++ b/level_0/f_capability/c/capability.c @@ -79,7 +79,7 @@ extern "C" { #endif // _di_f_capability_copy_external_ #ifndef _di_f_capability_copy_internal_ - f_status_t f_capability_copy_internal(const void *external, f_capability_t * const capability) { + f_status_t f_capability_copy_internal(const void * const external, f_capability_t * const capability) { #ifndef _di_level_0_parameter_checking_ if (!external) return F_status_set_error(F_parameter); if (!capability) return F_status_set_error(F_parameter); diff --git a/level_0/f_capability/tests/unit/c/mock-capability.c b/level_0/f_capability/tests/unit/c/mock-capability.c index 1db8e5e..04b642d 100644 --- a/level_0/f_capability/tests/unit/c/mock-capability.c +++ b/level_0/f_capability/tests/unit/c/mock-capability.c @@ -119,7 +119,7 @@ int __wrap_cap_free(void *pointer) { return 1; } -int __wrap_cap_from_name(const char *name, cap_value_t *value) { +int __wrap_cap_from_name(const char * const name, cap_value_t *value) { const bool failure = mock_type(bool); @@ -132,7 +132,7 @@ int __wrap_cap_from_name(const char *name, cap_value_t *value) { return 1; } -cap_t __wrap_cap_from_text(const char *text) { +cap_t __wrap_cap_from_text(const char * const text) { const bool failure = mock_type(bool); @@ -171,7 +171,7 @@ cap_t __wrap_cap_get_fd(int descriptor) { return (cap_t) 1; } -cap_t __wrap_cap_get_file(const char *path) { +cap_t __wrap_cap_get_file(const char * const path) { const bool failure = mock_type(bool); @@ -327,7 +327,7 @@ int __wrap_cap_set_fd(int descriptor, cap_t capability) { return 1; } -int __wrap_cap_set_file(const char *path, cap_t capability) { +int __wrap_cap_set_file(const char * const path, cap_t capability) { const bool failure = mock_type(bool); diff --git a/level_0/f_capability/tests/unit/c/mock-capability.h b/level_0/f_capability/tests/unit/c/mock-capability.h index 78e9c85..00d80ec 100644 --- a/level_0/f_capability/tests/unit/c/mock-capability.h +++ b/level_0/f_capability/tests/unit/c/mock-capability.h @@ -37,11 +37,11 @@ extern cap_t __wrap_cap_copy_int(void *data); extern int __wrap_cap_drop_bound(cap_value_t value); extern cap_t __wrap_cap_dup(cap_t capability); extern int __wrap_cap_free(void *pointer); -extern int __wrap_cap_from_name(const char *name, cap_value_t *value); -extern cap_t __wrap_cap_from_text(const char *text); +extern int __wrap_cap_from_name(const char * const name, cap_value_t *value); +extern cap_t __wrap_cap_from_text(const char * const text); extern int __wrap_cap_get_bound(cap_value_t value); extern cap_t __wrap_cap_get_fd(int descriptor); -extern cap_t __wrap_cap_get_file(const char *path); +extern cap_t __wrap_cap_get_file(const char * const path); extern int __wrap_cap_get_flag(cap_t capability, cap_value_t value, cap_flag_t flag, cap_flag_value_t *flag_value); extern cap_mode_t __wrap_cap_get_mode(void); extern uid_t __wrap_cap_get_nsowner(cap_t capability); @@ -53,7 +53,7 @@ extern unsigned __wrap_cap_get_secbits(void); extern int __wrap_cap_reset_ambient(void); extern int __wrap_cap_set_ambient(cap_value_t value, cap_flag_value_t flag_value); extern int __wrap_cap_set_fd(int descriptor, cap_t capability); -extern int __wrap_cap_set_file(const char *path, cap_t capability); +extern int __wrap_cap_set_file(const char * const path, cap_t capability); extern int __wrap_cap_set_flag(cap_t capability, cap_flag_t flag, int number, const cap_value_t *value, cap_flag_value_t flag_value); extern int __wrap_cap_set_mode(cap_mode_t mode); extern int __wrap_cap_set_nsowner(cap_t capability, uid_t id); diff --git a/level_0/f_conversion/tests/unit/c/mock-conversion.c b/level_0/f_conversion/tests/unit/c/mock-conversion.c index 5f7581e..a29fd68 100644 --- a/level_0/f_conversion/tests/unit/c/mock-conversion.c +++ b/level_0/f_conversion/tests/unit/c/mock-conversion.c @@ -4,7 +4,7 @@ extern "C" { #endif -size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *stream) { +size_t __wrap_fwrite_unlocked(const void * const ptr, size_t size, size_t n, FILE *stream) { const bool failure = mock_type(bool); diff --git a/level_0/f_conversion/tests/unit/c/mock-conversion.h b/level_0/f_conversion/tests/unit/c/mock-conversion.h index 67c168d..dead3e6 100644 --- a/level_0/f_conversion/tests/unit/c/mock-conversion.h +++ b/level_0/f_conversion/tests/unit/c/mock-conversion.h @@ -28,7 +28,7 @@ extern "C" { const static int mock_errno_generic = 32767; -extern size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *stream); +extern size_t __wrap_fwrite_unlocked(const void * const ptr, size_t size, size_t n, FILE *stream); #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_directory/c/private-directory.c b/level_0/f_directory/c/private-directory.c index ad790c2..7330794 100644 --- a/level_0/f_directory/c/private-directory.c +++ b/level_0/f_directory/c/private-directory.c @@ -59,7 +59,7 @@ extern "C" { #endif // !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_) #if !defined(_di_f_directory_remove_) - int private_f_directory_remove_recursively(const char *path, const struct stat *file_stat, int type, struct FTW *entity) { + int private_f_directory_remove_recursively(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) { if (!entity->level) { return 0; diff --git a/level_0/f_directory/c/private-directory.h b/level_0/f_directory/c/private-directory.h index d191ef4..ba07cef 100644 --- a/level_0/f_directory/c/private-directory.h +++ b/level_0/f_directory/c/private-directory.h @@ -111,7 +111,7 @@ extern "C" { * @see f_directory_remove() */ #if !defined(_di_f_directory_remove_) - extern int private_f_directory_remove_recursively(const char *path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; + extern int private_f_directory_remove_recursively(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; #endif // !defined(_di_f_directory_remove_) #ifdef __cplusplus diff --git a/level_0/f_signal/c/signal.c b/level_0/f_signal/c/signal.c index bb792d5..54ae284 100644 --- a/level_0/f_signal/c/signal.c +++ b/level_0/f_signal/c/signal.c @@ -233,7 +233,7 @@ extern "C" { #endif // _di_f_signal_set_has_ #ifndef _di_f_signal_wait_ - f_status_t f_signal_wait(const sigset_t *set, siginfo_t * const information) { + f_status_t f_signal_wait(const sigset_t * const set, siginfo_t * const information) { if (sigwaitinfo(set, information) < 0) { if (errno == EINTR) return F_status_set_error(F_interrupt); @@ -247,7 +247,7 @@ extern "C" { #endif // _di_f_signal_wait_ #ifndef _di_f_signal_wait_until_ - f_status_t f_signal_wait_until(const sigset_t *set, const struct timespec * timeout, siginfo_t * const information) { + f_status_t f_signal_wait_until(const sigset_t * const set, const struct timespec * timeout, siginfo_t * const information) { if (sigtimedwait(set, information, timeout) < 0) { if (errno == EAGAIN) return F_time_out; diff --git a/level_0/f_signal/c/signal.h b/level_0/f_signal/c/signal.h index 5d353d1..1f98a8d 100644 --- a/level_0/f_signal/c/signal.h +++ b/level_0/f_signal/c/signal.h @@ -339,7 +339,7 @@ extern "C" { * @see sigtimedwait() */ #ifndef _di_f_signal_wait_until_ - extern f_status_t f_signal_wait_until(const sigset_t *set, const struct timespec *timeout, siginfo_t * const information); + extern f_status_t f_signal_wait_until(const sigset_t * const set, const struct timespec *timeout, siginfo_t * const information); #endif // _di_f_signal_wait_until_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/common.h b/level_0/f_string/c/string/common.h index f33f52f..7585b81 100644 --- a/level_0/f_string/c/string/common.h +++ b/level_0/f_string/c/string/common.h @@ -21,7 +21,7 @@ extern "C" { * therefore this gets defined here. */ #ifdef _en_BUG_strnlen_ - extern size_t strnlen(const char *string, size_t max_length); + extern size_t strnlen(const char * const string, size_t max_length); #endif // _en_BUG_strnlen_ /** diff --git a/level_0/f_thread/c/thread.c b/level_0/f_thread/c/thread.c index 577eb01..6c49a98 100644 --- a/level_0/f_thread/c/thread.c +++ b/level_0/f_thread/c/thread.c @@ -79,7 +79,7 @@ extern "C" { #endif // defined(_pthread_attr_unsupported_) && !defined(_di_f_thread_attribute_affinity_set_) #ifndef _di_f_thread_attribute_clock_get_ - f_status_t f_thread_attribute_clock_get(const f_thread_condition_attribute_t *attribute, clockid_t * const id) { + f_status_t f_thread_attribute_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!id) return F_status_set_error(F_parameter); @@ -112,7 +112,7 @@ extern "C" { #endif // _di_f_thread_attribute_clock_set_ #ifndef _di_f_thread_attribute_condition_shared_get_ - f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t *attribute, int * const shared) { + f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!shared) return F_status_set_error(F_parameter); @@ -1126,7 +1126,7 @@ extern "C" { #endif // _di_f_thread_condition_attributes_resize_ #ifndef _di_f_thread_condition_create_ - f_status_t f_thread_condition_create(const f_thread_condition_attribute_t *attribute, f_thread_condition_t * const condition) { + f_status_t f_thread_condition_create(const f_thread_condition_attribute_t * const attribute, f_thread_condition_t * const condition) { #ifndef _di_level_0_parameter_checking_ if (!condition) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1332,7 +1332,7 @@ extern "C" { #endif // _di_f_thread_conditions_resize_ #ifndef _di_f_thread_create_ - f_status_t f_thread_create(const f_thread_attribute_t *attribute, f_thread_id_t * const id, void *(*routine) (void *), void *argument) { + f_status_t f_thread_create(const f_thread_attribute_t * const attribute, f_thread_id_t * const id, void *(*routine) (void *), void *argument) { #ifndef _di_level_0_parameter_checking_ if (!id) return F_status_set_error(F_parameter); if (!routine) return F_status_set_error(F_parameter); @@ -1625,7 +1625,7 @@ extern "C" { #endif // _di_f_thread_lock_attribute_delete_ #ifndef _di_f_thread_lock_attribute_shared_get_ - f_status_t f_thread_lock_attribute_shared_get(const f_thread_lock_attribute_t *attribute, int * const shared) { + f_status_t f_thread_lock_attribute_shared_get(const f_thread_lock_attribute_t * const attribute, int * const shared) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!shared) return F_status_set_error(F_parameter); @@ -1752,7 +1752,7 @@ extern "C" { #endif // _di_f_thread_lock_attributes_resize_ #ifndef _di_f_thread_lock_create_ - f_status_t f_thread_lock_create(const f_thread_lock_attribute_t *attribute, f_thread_lock_t * const lock) { + f_status_t f_thread_lock_create(const f_thread_lock_attribute_t * const attribute, f_thread_lock_t * const lock) { #ifndef _di_level_0_parameter_checking_ if (!lock) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2032,7 +2032,7 @@ extern "C" { #endif // _di_f_thread_mutex_attribute_delete_ #ifndef _di_f_thread_mutex_attribute_priority_ceiling_get_ - f_status_t f_thread_mutex_attribute_priority_ceiling_get(const f_thread_mutex_attribute_t *attribute, int * const ceiling) { + f_status_t f_thread_mutex_attribute_priority_ceiling_get(const f_thread_mutex_attribute_t * const attribute, int * const ceiling) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!ceiling) return F_status_set_error(F_parameter); @@ -2071,7 +2071,7 @@ extern "C" { #endif // _di_f_thread_mutex_attribute_priority_ceiling_set_ #ifndef _di_f_thread_mutex_attribute_shared_get_ - f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t *attribute, int * const shared) { + f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t * const attribute, int * const shared) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!shared) return F_status_set_error(F_parameter); @@ -2104,7 +2104,7 @@ extern "C" { #endif // _di_f_thread_mutex_attribute_shared_set_ #ifndef _di_f_thread_mutex_attribute_type_get_ - f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t *attribute, int * const type) { + f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t * const attribute, int * const type) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!type) return F_status_set_error(F_parameter); @@ -2137,7 +2137,7 @@ extern "C" { #endif // _di_f_thread_mutex_attribute_type_set_ #ifndef _di_f_thread_mutex_attribute_protocol_get_ - f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t *attribute, int * const protocol) { + f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol) { #ifndef _di_level_0_parameter_checking_ if (!attribute) return F_status_set_error(F_parameter); if (!protocol) return F_status_set_error(F_parameter); diff --git a/level_0/f_thread/c/thread.h b/level_0/f_thread/c/thread.h index 5cef3b3..f2c299c 100644 --- a/level_0/f_thread/c/thread.h +++ b/level_0/f_thread/c/thread.h @@ -124,7 +124,7 @@ extern "C" { * @see pthread_condattr_getclock() */ #ifndef _di_f_thread_attribute_clock_get_ - extern f_status_t f_thread_attribute_clock_get(const f_thread_condition_attribute_t *attribute, clockid_t * const id); + extern f_status_t f_thread_attribute_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id); #endif // _di_f_thread_attribute_clock_get_ /** @@ -166,7 +166,7 @@ extern "C" { * @see pthread_condattr_getpshared() */ #ifndef _di_f_thread_attribute_condition_shared_get_ - extern f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t *attribute, int * const shared); + extern f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared); #endif // _di_f_thread_attribute_condition_shared_get_ /** @@ -808,7 +808,7 @@ extern "C" { * @see pthread_barrierattr_getpshared() */ #ifndef _di_f_thread_barrier_attribute_shared_get_ - extern f_status_t f_thread_barrier_attribute_shared_get(const f_thread_barrier_attribute_t *attribute, int * const shared); + extern f_status_t f_thread_barrier_attribute_shared_get(const f_thread_barrier_attribute_t * const attribute, int * const shared); #endif // _di_f_thread_barrier_attribute_shared_get_ /** @@ -1517,7 +1517,7 @@ extern "C" { * @see pthread_cond_init() */ #ifndef _di_f_thread_condition_create_ - extern f_status_t f_thread_condition_create(const f_thread_condition_attribute_t *attribute, f_thread_condition_t * const condition); + extern f_status_t f_thread_condition_create(const f_thread_condition_attribute_t * const attribute, f_thread_condition_t * const condition); #endif // _di_f_thread_condition_create_ /** @@ -2208,7 +2208,7 @@ extern "C" { * @see pthread_rwlockattr_getpshared() */ #ifndef _di_f_thread_lock_attribute_shared_get_ - extern f_status_t f_thread_lock_attribute_shared_get(const f_thread_lock_attribute_t *attribute, int * const shared); + extern f_status_t f_thread_lock_attribute_shared_get(const f_thread_lock_attribute_t * const attribute, int * const shared); #endif // _di_f_thread_lock_attribute_shared_get_ /** @@ -2380,7 +2380,7 @@ extern "C" { * @see pthread_rwlock_init() */ #ifndef _di_f_thread_lock_create_ - extern f_status_t f_thread_lock_create(const f_thread_lock_attribute_t *attribute, f_thread_lock_t * const lock); + extern f_status_t f_thread_lock_create(const f_thread_lock_attribute_t * const attribute, f_thread_lock_t * const lock); #endif // _di_f_thread_lock_create_ /** @@ -2746,7 +2746,7 @@ extern "C" { * @see pthread_mutexattr_getprioceiling() */ #ifndef _di_f_thread_mutex_attribute_priority_ceiling_get_ - extern f_status_t f_thread_mutex_attribute_priority_ceiling_get(const f_thread_mutex_attribute_t *attribute, int * const ceiling); + extern f_status_t f_thread_mutex_attribute_priority_ceiling_get(const f_thread_mutex_attribute_t * const attribute, int * const ceiling); #endif // _di_f_thread_mutex_attribute_priority_ceiling_get_ /** @@ -2787,7 +2787,7 @@ extern "C" { * @see pthread_mutexattr_getpshared() */ #ifndef _di_f_thread_mutex_attribute_shared_get_ - extern f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t *attribute, int * const shared); + extern f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t * const attribute, int * const shared); #endif // _di_f_thread_mutex_attribute_shared_get_ /** @@ -2829,7 +2829,7 @@ extern "C" { * @see pthread_mutexattr_gettype() */ #ifndef _di_f_thread_mutex_attribute_type_get_ - extern f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t *attribute, int * const type); + extern f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t * const attribute, int * const type); #endif // _di_f_thread_mutex_attribute_type_get_ /** @@ -2872,7 +2872,7 @@ extern "C" { * @see pthread_mutexattr_getprotocol() */ #ifndef _di_f_thread_mutex_attribute_protocol_get_ - extern f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t *attribute, int * const protocol); + extern f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol); #endif // _di_f_thread_mutex_attribute_protocol_get_ /** diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index 9fcd6e8..135bbed 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -131,7 +131,7 @@ extern "C" { #endif // _di_fll_program_parameter_process_empty_ #ifndef _di_fll_program_parameter_additional_append_ - f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination) { + f_status_t fll_program_parameter_additional_append(const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); diff --git a/level_2/fll_program/c/program.h b/level_2/fll_program/c/program.h index 873d303..ed7ba6f 100644 --- a/level_2/fll_program/c/program.h +++ b/level_2/fll_program/c/program.h @@ -264,7 +264,7 @@ extern "C" { * @see f_string_dynamic_append() */ #ifndef _di_fll_program_parameter_additional_append_ - extern f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); + extern f_status_t fll_program_parameter_additional_append(const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); #endif // _di_fll_program_parameter_additional_append_ /** @@ -321,7 +321,7 @@ extern "C" { * @see fl_string_dynamic_rip() */ #ifndef _di_fll_program_parameter_additional_rip_ - extern f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); + extern f_status_t fll_program_parameter_additional_rip(const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); #endif // _di_fll_program_parameter_additional_rip_ /** diff --git a/level_3/controller/c/control/private-control.c b/level_3/controller/c/control/private-control.c index 6dad89f..ee1f0a6 100644 --- a/level_3/controller/c/control/private-control.c +++ b/level_3/controller/c/control/private-control.c @@ -8,7 +8,7 @@ extern "C" { #endif #ifndef _di_controller_control_accept_ - f_status_t controller_control_accept(const controller_global_t *global, controller_control_t * const control) { + f_status_t controller_control_accept(const controller_global_t * const global, controller_control_t * const control) { f_socket_t client = f_socket_t_initialize; @@ -160,7 +160,7 @@ extern "C" { #endif // _di_controller_control_accept_ #ifndef _di_controller_control_configure_client_ - f_status_t controller_control_configure_client(const controller_global_t *global, f_socket_t * const client) { + f_status_t controller_control_configure_client(const controller_global_t * const global, f_socket_t * const client) { struct timeval time_out; time_out.tv_sec = 0; @@ -181,7 +181,7 @@ extern "C" { #endif // _di_controller_control_configure_client_ #ifndef _di_controller_control_configure_server_ - f_status_t controller_control_configure_server(const controller_global_t *global, f_socket_t * const server) { + f_status_t controller_control_configure_server(const controller_global_t * const global, f_socket_t * const server) { const struct linger value = { 1, controller_control_default_socket_linger_d }; @@ -226,7 +226,7 @@ extern "C" { #endif // _di_controller_control_packet_header_length_ #ifndef _di_controller_control_respond_build_header_ - f_status_t controller_control_respond_build_header(const controller_global_t *global, controller_control_t * const control, const f_string_static_t type, const f_string_static_t status, const f_array_length_t length) { + f_status_t controller_control_respond_build_header(const controller_global_t * const global, controller_control_t * const control, const f_string_static_t type, const f_string_static_t status, const f_array_length_t length) { f_status_t status2 = F_none; @@ -282,7 +282,7 @@ extern "C" { #endif // _di_controller_control_respond_build_header_ #ifndef _di_controller_control_respond_error_ - f_status_t controller_control_respond_error(const controller_global_t *global, controller_control_t * const control, const f_status_t status, const f_string_static_t message) { + f_status_t controller_control_respond_error(const controller_global_t * const global, controller_control_t * const control, const f_status_t status, const f_string_static_t message) { f_status_t status2 = F_none; @@ -311,7 +311,7 @@ extern "C" { #endif // _di_controller_control_respond_error_ #ifndef _di_controller_control_respond_error_string_ - f_status_t controller_control_respond_error_string(const controller_global_t *global, controller_control_t * const control, const f_status_t status, const f_string_t message) { + f_status_t controller_control_respond_error_string(const controller_global_t * const global, controller_control_t * const control, const f_status_t status, const f_string_t message) { const f_string_static_t string = macro_f_string_static_t_initialize2(message, strlen(message)); diff --git a/level_3/controller/c/control/private-control.h b/level_3/controller/c/control/private-control.h index aaa0b53..b9c34d0 100644 --- a/level_3/controller/c/control/private-control.h +++ b/level_3/controller/c/control/private-control.h @@ -31,7 +31,7 @@ extern "C" { * @see f_socket_accept() */ #ifndef _di_controller_control_accept_ - extern f_status_t controller_control_accept(const controller_global_t *global, controller_control_t * const control) F_attribute_visibility_internal_d; + extern f_status_t controller_control_accept(const controller_global_t * const global, controller_control_t * const control) F_attribute_visibility_internal_d; #endif // _di_controller_control_accept_ /** @@ -50,7 +50,7 @@ extern "C" { * @see f_socket_option_set() */ #ifndef _di_controller_control_configure_client_ - extern f_status_t controller_control_configure_client(const controller_global_t *global, f_socket_t * const client) F_attribute_visibility_internal_d; + extern f_status_t controller_control_configure_client(const controller_global_t * const global, f_socket_t * const client) F_attribute_visibility_internal_d; #endif // _di_controller_control_configure_client_ /** @@ -69,7 +69,7 @@ extern "C" { * @see f_socket_option_set() */ #ifndef _di_controller_control_configure_server_ - extern f_status_t controller_control_configure_server(const controller_global_t *global, f_socket_t * const server) F_attribute_visibility_internal_d; + extern f_status_t controller_control_configure_server(const controller_global_t * const global, f_socket_t * const server) F_attribute_visibility_internal_d; #endif // _di_controller_control_configure_server_ /** @@ -136,7 +136,7 @@ extern "C" { * @see f_socket_read() */ #ifndef _di_controller_control_respond_ - extern f_status_t controller_control_respond(const controller_global_t *global, controller_control_t * const control) F_attribute_visibility_internal_d; + extern f_status_t controller_control_respond(const controller_global_t * const global, controller_control_t * const control) F_attribute_visibility_internal_d; #endif // _di_controller_control_respond_ /** @@ -177,7 +177,7 @@ extern "C" { * @see fll_fss_payload_write_string() */ #ifndef _di_controller_control_respond_build_header_ - extern f_status_t controller_control_respond_build_header(const controller_global_t *global, controller_control_t * const control, const f_string_static_t type, const f_string_static_t status, const f_array_length_t length) F_attribute_visibility_internal_d; + extern f_status_t controller_control_respond_build_header(const controller_global_t * const global, controller_control_t * const control, const f_string_static_t type, const f_string_static_t status, const f_array_length_t length) F_attribute_visibility_internal_d; #endif // _di_controller_control_respond_build_header_ /** @@ -212,7 +212,7 @@ extern "C" { * @see f_socket_write() */ #ifndef _di_controller_control_respond_error_ - extern f_status_t controller_control_respond_error(const controller_global_t *global, controller_control_t * const control, const f_status_t status, const f_string_static_t message) F_attribute_visibility_internal_d; + extern f_status_t controller_control_respond_error(const controller_global_t * const global, controller_control_t * const control, const f_status_t status, const f_string_static_t message) F_attribute_visibility_internal_d; #endif // _di_controller_control_respond_error_ /** @@ -238,7 +238,7 @@ extern "C" { * @see controller_control_respond_error() */ #ifndef _di_controller_control_respond_error_string_ - extern f_status_t controller_control_respond_error_string(const controller_global_t *global, controller_control_t * const control, const f_status_t status, const f_string_t message) F_attribute_visibility_internal_d; + extern f_status_t controller_control_respond_error_string(const controller_global_t * const global, controller_control_t * const control, const f_status_t status, const f_string_t message) F_attribute_visibility_internal_d; #endif // _di_controller_control_respond_error_string_ #ifdef __cplusplus diff --git a/level_3/controller/c/controller/private-controller.c b/level_3/controller/c/controller/private-controller.c index 012d38a..70fe99d 100644 --- a/level_3/controller/c/controller/private-controller.c +++ b/level_3/controller/c/controller/private-controller.c @@ -375,7 +375,7 @@ extern "C" { #endif // _di_controller_get_id_group_ #ifndef _di_controller_perform_ready_ - f_status_t controller_perform_ready(const controller_global_t *global, controller_cache_t * const cache, const bool is_entry) { + f_status_t controller_perform_ready(const controller_global_t * const global, controller_cache_t * const cache, const bool is_entry) { if (!is_entry) { return F_none; diff --git a/level_3/controller/c/controller/private-controller.h b/level_3/controller/c/controller/private-controller.h index b931d24..640cce4 100644 --- a/level_3/controller/c/controller/private-controller.h +++ b/level_3/controller/c/controller/private-controller.h @@ -275,7 +275,7 @@ extern "C" { * @see controller_file_pid_create() */ #ifndef _di_controller_perform_ready_ - extern f_status_t controller_perform_ready(const controller_global_t *global, controller_cache_t * const cache, const bool is_entry) F_attribute_visibility_internal_d; + extern f_status_t controller_perform_ready(const controller_global_t * const global, controller_cache_t * const cache, const bool is_entry) F_attribute_visibility_internal_d; #endif // _di_controller_perform_ready_ /** diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index 49f548e..7befb63 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -896,7 +896,7 @@ extern "C" { #endif // _di_controller_entry_preprocess_ #ifndef _di_controller_entry_process_ - f_status_t controller_entry_process(const controller_global_t *global, controller_cache_t * const cache, const bool failsafe, const bool is_entry) { + f_status_t controller_entry_process(const controller_global_t * const global, controller_cache_t * const cache, const bool failsafe, const bool is_entry) { f_status_t status = F_none; f_status_t status_lock = F_none; diff --git a/level_3/controller/c/entry/private-entry.h b/level_3/controller/c/entry/private-entry.h index 473663a..b2d0510 100644 --- a/level_3/controller/c/entry/private-entry.h +++ b/level_3/controller/c/entry/private-entry.h @@ -152,7 +152,7 @@ extern "C" { * @see controller_dynamic_append_terminated() */ #ifndef _di_controller_entry_process_ - extern f_status_t controller_entry_process(const controller_global_t *global, controller_cache_t * const cache, const bool failsafe, const bool is_entry) F_attribute_visibility_internal_d; + extern f_status_t controller_entry_process(const controller_global_t * const global, controller_cache_t * const cache, const bool failsafe, const bool is_entry) F_attribute_visibility_internal_d; #endif // _di_controller_entry_process_ /** diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index b03359c..f9d1fdb 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -57,7 +57,7 @@ extern "C" { #endif // _di_fake_clean_operate_ #if !defined(_di_fake_clean_operate_) - int fake_clean_remove_recursively_verbosely(const char *path, const struct stat *file_stat, int type, struct FTW *entity) { + int fake_clean_remove_recursively_verbosely(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) { if (!entity->level || !path) return 0; diff --git a/level_3/fake/c/private-clean.h b/level_3/fake/c/private-clean.h index bc9894d..a8dc8b3 100644 --- a/level_3/fake/c/private-clean.h +++ b/level_3/fake/c/private-clean.h @@ -55,7 +55,7 @@ extern "C" { * @see remove() */ #if !defined(_di_fake_clean_operate_) - extern int fake_clean_remove_recursively_verbosely(const char *path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; + extern int fake_clean_remove_recursively_verbosely(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; #endif // !defined(_di_fake_clean_operate_) #ifdef __cplusplus