forked from NIFTI-Imaging/nifti_clib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminated duplicate strlen() call, fix strlen() truncation to int
strlen() is O(N) and thus slow for long strings. modify_field() always calls strlen() at the beginning, but was sometimes calling it again later. No need to compute the length twice. Also use size_t for the return value of strlen() instead of truncating to int.
- Loading branch information
1 parent
04ac6b1
commit 8f72d11
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters