aboutsummaryrefslogtreecommitdiffstats
path: root/libpatch_reverse_diff2.c
blob: a247efd010578f7b8481376711f8ceebf3029a1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* See LICENSE file for copyright and license details. */
#include "common.h"


void
libpatch_reverse_diff2(struct libpatch_diff2 *diff, size_t difflen)
{
	size_t i;
	for (i = 0; i < difflen; i++) {
		if (diff[i].change == 1)
			diff[i].change = 2;
		else if (diff[i].change == 2)
			diff[i].change = 1;
	}
}