Skip to content

Refactor excessive logic/side effects in return statement #876

@skliper

Description

@skliper

Is your feature request related to a problem? Please describe.
Excessive logic in OS_FileSys_FindVirtMountPoint return statement. This isn't coding standard compliant and takes a while to sort out when first observed:

return (mplen > 0 && mplen < sizeof(filesys->virtual_mountpt) &&
strncmp(target, filesys->virtual_mountpt, mplen) == 0 && (target[mplen] == '/' || target[mplen] == 0));

Describe the solution you'd like
Refactor/comment to make more clear.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC, OSAL code review

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions