diff options
author | David Härdeman <david@hardeman.nu> | 2007-05-19 17:26:03 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2007-05-19 17:26:03 +0200 |
commit | a4e5b979d910384577750a4672fee44e7c468bd0 (patch) | |
tree | 133393bb4876691546a200d626653fb412987783 /metaentry.c | |
parent | 5fed2f9169fdd0585cc83ff0fa8210d97da77cb2 (diff) |
Remove the need for a global variable (do_mtime)
Diffstat (limited to 'metaentry.c')
-rw-r--r-- | metaentry.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/metaentry.c b/metaentry.c index d8c7cb8..28046f2 100644 --- a/metaentry.c +++ b/metaentry.c @@ -515,7 +515,7 @@ mentry_compare_xattr(struct metaentry *left, struct metaentry *right) } static int -mentry_compare(struct metaentry *left, struct metaentry *right) +mentry_compare(struct metaentry *left, struct metaentry *right, int do_mtime) { int retval = DIFF_NONE; @@ -555,7 +555,8 @@ mentry_compare(struct metaentry *left, struct metaentry *right) void mentries_compare(struct metaentry *mheadleft, struct metaentry *mheadright, - void (*printfunc)(struct metaentry *, struct metaentry *, int)) + void (*pfunc)(struct metaentry *, struct metaentry *, int), + int do_mtime) { struct metaentry *left, *right; int cmp; @@ -570,14 +571,14 @@ mentries_compare(struct metaentry *mheadleft, if (!right) cmp = DIFF_ADDED; else - cmp = mentry_compare(left, right); - printfunc(left, right, cmp); + cmp = mentry_compare(left, right, do_mtime); + pfunc(left, right, cmp); } for (right = mheadright; right; right = right->next) { left = mentry_find(right->path, mheadleft); if (!left) - printfunc(left, right, DIFF_DELE); + pfunc(left, right, DIFF_DELE); } } |