2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Avoid compiler casting warnings by assigning to the same type where possible

This saves instructions that are related to casting as well as compiler warnings.
This commit is contained in:
Rose
2023-05-18 14:38:18 -04:00
parent a0b074cc9c
commit e54ba33ea0
50 changed files with 175 additions and 168 deletions

View File

@@ -656,7 +656,7 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
mode_t cmnd_umask, char *iolog_path, void *v)
{
struct sudoers_exec_args *exec_args = v;
int info_len = 0;
unsigned int info_len = 0;
debug_decl(sudoers_policy_store_result, SUDOERS_DEBUG_PLUGIN);
if (exec_args == NULL)
@@ -1051,8 +1051,8 @@ oom:
bad:
free(audit_msg);
audit_msg = NULL;
while (info_len--)
free(command_info[info_len]);
while (info_len)
free(command_info[--info_len]);
free(command_info);
command_info = NULL;
debug_return_bool(false);