1*0baf9d8dSJessica Hamilton /*
2*0baf9d8dSJessica Hamilton * copy.c --- copy UUIDs
3*0baf9d8dSJessica Hamilton *
4*0baf9d8dSJessica Hamilton * Copyright (C) 1996, 1997 Theodore Ts'o.
5*0baf9d8dSJessica Hamilton *
6*0baf9d8dSJessica Hamilton * %Begin-Header%
7*0baf9d8dSJessica Hamilton * Redistribution and use in source and binary forms, with or without
8*0baf9d8dSJessica Hamilton * modification, are permitted provided that the following conditions
9*0baf9d8dSJessica Hamilton * are met:
10*0baf9d8dSJessica Hamilton * 1. Redistributions of source code must retain the above copyright
11*0baf9d8dSJessica Hamilton * notice, and the entire permission notice in its entirety,
12*0baf9d8dSJessica Hamilton * including the disclaimer of warranties.
13*0baf9d8dSJessica Hamilton * 2. Redistributions in binary form must reproduce the above copyright
14*0baf9d8dSJessica Hamilton * notice, this list of conditions and the following disclaimer in the
15*0baf9d8dSJessica Hamilton * documentation and/or other materials provided with the distribution.
16*0baf9d8dSJessica Hamilton * 3. The name of the author may not be used to endorse or promote
17*0baf9d8dSJessica Hamilton * products derived from this software without specific prior
18*0baf9d8dSJessica Hamilton * written permission.
19*0baf9d8dSJessica Hamilton *
20*0baf9d8dSJessica Hamilton * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21*0baf9d8dSJessica Hamilton * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22*0baf9d8dSJessica Hamilton * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
23*0baf9d8dSJessica Hamilton * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
24*0baf9d8dSJessica Hamilton * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25*0baf9d8dSJessica Hamilton * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26*0baf9d8dSJessica Hamilton * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27*0baf9d8dSJessica Hamilton * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28*0baf9d8dSJessica Hamilton * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*0baf9d8dSJessica Hamilton * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30*0baf9d8dSJessica Hamilton * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
31*0baf9d8dSJessica Hamilton * DAMAGE.
32*0baf9d8dSJessica Hamilton * %End-Header%
33*0baf9d8dSJessica Hamilton */
34*0baf9d8dSJessica Hamilton
35*0baf9d8dSJessica Hamilton #include "uuidP.h"
36*0baf9d8dSJessica Hamilton
uuid_copy(uuid_t dst,const uuid_t src)37*0baf9d8dSJessica Hamilton void uuid_copy(uuid_t dst, const uuid_t src)
38*0baf9d8dSJessica Hamilton {
39*0baf9d8dSJessica Hamilton unsigned char *cp1;
40*0baf9d8dSJessica Hamilton const unsigned char *cp2;
41*0baf9d8dSJessica Hamilton int i;
42*0baf9d8dSJessica Hamilton
43*0baf9d8dSJessica Hamilton for (i=0, cp1 = dst, cp2 = src; i < 16; i++)
44*0baf9d8dSJessica Hamilton *cp1++ = *cp2++;
45*0baf9d8dSJessica Hamilton }
46