Declare loop variables inside for loop declaration where possible.

PiperOrigin-RevId: 518846098
Change-Id: Icdb2e5894bd80110552e29270472eeb242e6cf2c
This commit is contained in:
Nimrod Gileadi
2023-03-23 06:48:32 -07:00
committed by Copybara-Service
parent ce6c9053e2
commit 145fe7f354
9 changed files with 111 additions and 107 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ static void vfs_strippath(char* newname, const char* oldname) {
mju_strncpy(newname, oldname+i+1, mjMAXVFSNAME);
// make lowercase
for (i=strlen(newname)-1; i>=0; i--) {
for (int i=strlen(newname)-1; i>=0; i--) {
if (newname[i]>='A' && newname[i]<='Z') {
newname[i] = (char)(((int)newname[i]) +'a' - 'A');
}