diff options
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -5118,13 +5118,11 @@ void diff_change(struct diff_options *options, if (DIFF_OPT_TST(options, REVERSE_DIFF)) { unsigned tmp; - const unsigned char *tmp_c; - tmp = old_mode; old_mode = new_mode; new_mode = tmp; - tmp_c = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_c; + SWAP(old_mode, new_mode); + SWAP(old_sha1, new_sha1); tmp = old_sha1_valid; old_sha1_valid = new_sha1_valid; new_sha1_valid = tmp; - tmp = old_dirty_submodule; old_dirty_submodule = new_dirty_submodule; - new_dirty_submodule = tmp; + SWAP(old_dirty_submodule, new_dirty_submodule); } if (options->prefix && |