Prefer size_t over int, as casting can take extra instructions

This commit is contained in:
Rose
2023-05-03 15:17:40 -04:00
parent bbbaea5b2f
commit 459a49b1fe
3 changed files with 5 additions and 5 deletions

View File

@@ -589,10 +589,10 @@ sudo_debug_exit_str_masked_v1(const char *func, const char *file, int line,
int subsys, const char *ret)
{
static const char stars[] = "********************************************************************************";
int len = ret ? strlen(ret) : sizeof("(null)") - 1;
size_t len = ret ? strlen(ret) : sizeof("(null)") - 1;
sudo_debug_printf2(NULL, NULL, 0, subsys | SUDO_DEBUG_TRACE,
"<- %s @ %s:%d := %.*s", func, file, line, len, ret ? stars : "(null)");
"<- %s @ %s:%zu := %.*s", func, file, line, len, ret ? stars : "(null)");
}
void