aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/uuid/uuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/uuid/uuid.h')
-rw-r--r--e2fsprogs/uuid/uuid.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/e2fsprogs/uuid/uuid.h b/e2fsprogs/uuid/uuid.h
index fbb937e11..ec6ba52d7 100644
--- a/e2fsprogs/uuid/uuid.h
+++ b/e2fsprogs/uuid/uuid.h
@@ -66,14 +66,14 @@ extern "C" {
66 66
67/* clear.c */ 67/* clear.c */
68/*void uuid_clear(uuid_t uu);*/ 68/*void uuid_clear(uuid_t uu);*/
69#define uuid_clear(uu) memset(uu, 0, 16) 69#define uuid_clear(uu) memset(uu, 0, sizeof(uu))
70 70
71/* compare.c */ 71/* compare.c */
72int uuid_compare(const uuid_t uu1, const uuid_t uu2); 72int uuid_compare(const uuid_t uu1, const uuid_t uu2);
73 73
74/* copy.c */ 74/* copy.c */
75/*void uuid_copy(uuid_t dst, const uuid_t src);*/ 75/*void uuid_copy(uuid_t dst, const uuid_t src);*/
76#define uuid_copy(dst,src) memcpy(dst,src,16) 76#define uuid_copy(dst,src) memcpy(dst, src, sizeof(dst))
77 77
78/* gen_uuid.c */ 78/* gen_uuid.c */
79void uuid_generate(uuid_t out); 79void uuid_generate(uuid_t out);
@@ -81,7 +81,8 @@ void uuid_generate_random(uuid_t out);
81void uuid_generate_time(uuid_t out); 81void uuid_generate_time(uuid_t out);
82 82
83/* isnull.c */ 83/* isnull.c */
84int uuid_is_null(const uuid_t uu); 84/*int uuid_is_null(const uuid_t uu);*/
85#define uuid_is_null(uu) (!memcmp(uu, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", sizeof(uu)))
85 86
86/* parse.c */ 87/* parse.c */
87int uuid_parse(const char *in, uuid_t uu); 88int uuid_parse(const char *in, uuid_t uu);