Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / lib / uuid / compare.c
1 /*
2  * compare.c --- compare whether or not two UUID's are the same
3  *
4  * Returns 0 if the two UUID's are different, and 1 if they are the same.
5  */
6
7 #include "uuidP.h"
8
9 int uuid_compare(uuid_t uu1, uuid_t uu2)
10 {
11         unsigned char   *cp1, *cp2;
12         int             i;
13
14         for (i=0, cp1 = uu1, cp2 = uu2; i < 16; i++)
15                 if (*cp1++ != *cp2++)
16                         return 0;
17         return 1;
18 }
19