diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-02-15 12:54:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-15 12:54:19 -0800 |
commit | cbf1860d73b782e7924e63361df485b31225a26a (patch) | |
tree | a86ce71a399fb8153be1552f08e51c58b2c5b5cf /diff.c | |
parent | 2f4e87d7777a0bcffa8a7cc3cc52e1e8b2c352ff (diff) | |
parent | 9e2edd66dda418dad751d5eb2e5921e05e57cd30 (diff) | |
download | git-cbf1860d73b782e7924e63361df485b31225a26a.tar.gz |
Merge branch 'rs/swap'
Code clean-up.
* rs/swap:
graph: use SWAP macro
diff: use SWAP macro
use SWAP macro
apply: use SWAP macro
add SWAP macro
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -5118,14 +5118,10 @@ void diff_change(struct diff_options *options, return; 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; - 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_mode, new_mode); + SWAP(old_sha1, new_sha1); + SWAP(old_sha1_valid, new_sha1_valid); + SWAP(old_dirty_submodule, new_dirty_submodule); } if (options->prefix && |