aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb4/swab.c
blob: e07b28b4343309e0a966ea94766d441cc110f1b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* simple implementation of swab. */

swab(from,to,nbytes) 
        char *from;
        char *to;
        int nbytes;
{
	char tmp;
        while ( (nbytes-=2) >= 0 ) {
                tmp = from[1];
                to[1] = from[0];
		to[0] = tmp;
                to++; to++;
                from++; from++;
        }
}