diff options
Diffstat (limited to 'lib/uuid/isnull.c')
-rw-r--r-- | lib/uuid/isnull.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/uuid/isnull.c b/lib/uuid/isnull.c new file mode 100644 index 00000000..f72e8fba --- /dev/null +++ b/lib/uuid/isnull.c @@ -0,0 +1,18 @@ +/* + * isnull.c --- Check whether or not the UUID is null + */ + +#include "uuidP.h" + +/* Returns 1 if the uuid is the NULL uuid */ +int uuid_is_null(uuid_t uu) +{ + unsigned char *cp; + int i; + + for (i=0, cp = uu; i < 16; i++) + if (*cp++) + return 0; + return 1; +} + |