Skip to content

Commit

Permalink
Declaring variable at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
Tvisha Andharia committed Dec 2, 2024
1 parent e4e0355 commit 6ca59ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/os/shared/src/osapi-filesys.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ int32 OS_TranslatePath(const char *VirtualPath, char *LocalPath)
OS_object_token_t token;
int32 return_code;
const char * name_ptr;
char * result;
OS_filesys_internal_record_t *filesys;
size_t SysMountPointLen;
size_t VirtPathLen;
Expand Down Expand Up @@ -702,7 +703,7 @@ int32 OS_TranslatePath(const char *VirtualPath, char *LocalPath)
return OS_FS_ERR_PATH_INVALID;
}

char *result = strstr(VirtualPath, "..");
result = strstr(VirtualPath, "..");
if (result) {
return OS_FS_ERR_PATH_INVALID;
}
Expand Down

0 comments on commit 6ca59ba

Please sign in to comment.