summaryrefslogtreecommitdiff
path: root/diff-no-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff-no-index.c')
-rw-r--r--diff-no-index.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index 7814eab..9a8b093 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -26,9 +26,8 @@ static int read_directory_contents(const char *path, struct string_list *list)
if (!(dir = opendir(path)))
return error("Could not open directory %s", path);
- while ((e = readdir(dir)))
- if (!is_dot_or_dotdot(e->d_name))
- string_list_insert(list, e->d_name);
+ while ((e = readdir_skip_dot_and_dotdot(dir)))
+ string_list_insert(list, e->d_name);
closedir(dir);
return 0;
@@ -83,7 +82,7 @@ static struct diff_filespec *noindex_filespec(const char *name, int mode)
if (!name)
name = "/dev/null";
s = alloc_filespec(name);
- fill_filespec(s, &null_oid, 0, mode);
+ fill_filespec(s, null_oid(), 0, mode);
if (name == file_from_standard_input)
populate_from_stdin(s);
return s;