merge-base --fork-point doc: clarify the example and failure modes
[gitweb.git] / diff-no-index.c
index f420786039d387d3a943d510c802ecd90c3ddf28..df762fd0f7d1ec74175a42de07b064107d3a601a 100644 (file)
@@ -185,10 +185,8 @@ static int queue_diff(struct diff_options *o,
                struct diff_filespec *d1, *d2;
 
                if (DIFF_OPT_TST(o, REVERSE_DIFF)) {
-                       unsigned tmp;
-                       const char *tmp_c;
-                       tmp = mode1; mode1 = mode2; mode2 = tmp;
-                       tmp_c = name1; name1 = name2; name2 = tmp_c;
+                       SWAP(mode1, mode2);
+                       SWAP(name1, name2);
                }
 
                d1 = noindex_filespec(name1, mode1);