From: sushmaunnibhavi <sushmaunnibhavi425@gmail.com>
To: git@vger.kernel.org
Subject: [GSOC][PATCH 1/2] modified dir-iterator.c
Date: Fri, 8 Mar 2019 19:33:07 +0530 [thread overview]
Message-ID: <20190308140307.GA22661@hacker-queen> (raw)
---
Some places in git use raw API opendir/readdir/closedir to traverse a directory recursively, which usually involves function recursion. Now that we have struct dir_iterator,we have to convert these to use the dir-iterator to simplify the code.
Signed-off-by: Sushma Unnibhavi <sushmaunnibhavi425@gmail.com>
dir-iterator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dir-iterator.c b/dir-iterator.c
index f2dcd82fde..a3b5b8929c 100644
--- a/dir-iterator.c
+++ b/dir-iterator.c
@@ -169,7 +169,7 @@ int dir_iterator_abort(struct dir_iterator *dir_iterator)
struct dir_iterator_level *level =
&iter->levels[iter->levels_nr - 1];
- if (level->dir && closedir(level->dir)) {
+ if (level->dir && (struct dir_iterator_int *)(level->dir)) {//changed closedir to (struct dir_iterator_int *)
strbuf_setlen(&iter->base.path, level->prefix_len);
warning("error closing directory %s: %s",
iter->base.path.buf, strerror(errno));
--
2.17.1
next reply other threads:[~2019-03-08 14:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 14:03 sushmaunnibhavi [this message]
2019-03-09 16:12 ` [GSOC][PATCH 1/2] modified dir-iterator.c Thomas Gummerer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190308140307.GA22661@hacker-queen \
--to=sushmaunnibhavi425@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.