Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-15 11:57:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-15 11:57:16 +0400
commit81d240c8c86d0741e26eaa3f8b4b4c9bfac38f1a (patch)
treee82c8d7fd138f91c6b324b6b30cd7ad948af9052 /source/blender/makesdna/intern
parent34b7495523190f75cc4c13f03f86adc8d2de582b (diff)
avoid using strlen() for comparisons in for loops. for expanding whitespace in the text editor and ui paste.
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r--source/blender/makesdna/intern/makesdna.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index fa0b313a120..e02a9bfe56a 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -984,7 +984,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
/* little test first... */
/* Mind the breaking condition here! */
if (debugSDNA) printf("\tStart of header scan:\n");
- for (i = 0; strlen(includefiles[i]); i++) {
+ for (i = 0; *(includefiles[i]) != '\0'; i++) {
sprintf(str, "%s%s", baseDirectory, includefiles[i]);
if (debugSDNA) printf("\t|-- Converting %s\n", str);
if (convert_include(str)) {
@@ -1100,7 +1100,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
else {
/* add all include files defined in the global array */
- for (i = 0; strlen(includefiles[i]); i++) {
+ for (i = 0; *(includefiles[i]) != '\0'; i++) {
fprintf(fp, "#include \"%s%s\"\n", baseDirectory, includefiles[i]);
}