aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/uuid/uuid.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-11 00:36:04 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-11 00:36:04 +0000
commitcae717e1f6e9615313663558bf7edbba6c758e90 (patch)
treea9a8d79326e3c1222858c9d3b9cd88fc6deece47 /e2fsprogs/uuid/uuid.h
parentf3d28845f845b64410e292e93e385bb072bf5143 (diff)
downloadbusybox-cae717e1f6e9615313663558bf7edbba6c758e90.tar.gz
replace simple is_null func with a memcmp define
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" {
/* clear.c */
/*void uuid_clear(uuid_t uu);*/
-#define uuid_clear(uu) memset(uu, 0, 16)
+#define uuid_clear(uu) memset(uu, 0, sizeof(uu))
/* compare.c */
int uuid_compare(const uuid_t uu1, const uuid_t uu2);
/* copy.c */
/*void uuid_copy(uuid_t dst, const uuid_t src);*/
-#define uuid_copy(dst,src) memcpy(dst,src,16)
+#define uuid_copy(dst,src) memcpy(dst, src, sizeof(dst))
/* gen_uuid.c */
void uuid_generate(uuid_t out);
@@ -81,7 +81,8 @@ void uuid_generate_random(uuid_t out);
void uuid_generate_time(uuid_t out);
/* isnull.c */
-int uuid_is_null(const uuid_t uu);
+/*int uuid_is_null(const uuid_t uu);*/
+#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)))
/* parse.c */
int uuid_parse(const char *in, uuid_t uu);