diff options
author | Brian Lopez <seniorlopez@gmail.com> | 2017-03-02 15:32:00 -0800 |
---|---|---|
committer | Brian Lopez <seniorlopez@gmail.com> | 2017-03-02 15:32:00 -0800 |
commit | 06f2e3d0ce58d830cf561da6f6d4759b7278515f (patch) | |
tree | 9028130bd243228390b164d22ba2da6305f133c8 | |
parent | ba45438d283c279a8a4c585390b25567bc6618e4 (diff) | |
download | libgit2-06f2e3d0ce58d830cf561da6f6d4759b7278515f.tar.gz |
bring declaration outside of for loop statement body
-rw-r--r-- | src/attr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/attr.c b/src/attr.c index 6c3d14ef2..559f5353e 100644 --- a/src/attr.c +++ b/src/attr.c @@ -651,10 +651,11 @@ static int collect_attr_files( if (!error) { int length = strlen(path); char *attr_file_parent_path = malloc((length + 1) * sizeof(char)); + int i; // Then push potential gitattribute files along the path components // of the full file path. - for (int i = 0; i < length; i++) { + for (i = 0; i < length; i++) { if (path[i] == '/') { strncpy(attr_file_parent_path, path, i); |