-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
uuid->parts[0] = uuid->parts[1] = uuid->parts[2] = uuid->parts[3] = 0;
}
+/* Returns true if 'uuid' is all zero, otherwise false. */
+bool
+uuid_is_zero(const struct uuid *uuid)
+{
+ return (!uuid->parts[0] && !uuid->parts[1]
+ && !uuid->parts[2] && !uuid->parts[3]);
+}
+
/* Compares 'a' and 'b'. Returns a negative value if 'a < b', zero if 'a ==
* b', or positive if 'a > b'. The ordering is lexicographical order of the
* conventional way of writing out UUIDs as strings. */