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

@@ -87,7 +87,7 @@ sudo_sig2str(int signo, char *signame)
strlcpy(signame, cp, SIG2STR_MAX);
/* Make sure we always return an upper case signame. */
if (islower((unsigned char)signame[0])) {
int i;
size_t i;
for (i = 0; signame[i] != '\0'; i++)
signame[i] = toupper((unsigned char)signame[i]);
}