sessiond: Split ust_registry_session into per-type classes
[lttng-tools.git] / src / common / uuid.cpp
index 558110fc0e9e7e46b6d75f44978dfad0944c7454..23672a96fe131f755df81eb357cc7c865619a0da 100644 (file)
@@ -72,10 +72,7 @@ int lttng_uuid_generate(lttng_uuid uuid_out)
 {
        int i, ret = 0;
 
-       if (uuid_out == NULL) {
-               ret = -1;
-               goto end;
-       }
+       LTTNG_ASSERT(uuid_out);
 
        if (!lttng_uuid_is_init) {
                /*
@@ -88,8 +85,8 @@ int lttng_uuid_generate(lttng_uuid uuid_out)
                        ret = -1;
                        goto end;
                }
-               srand(epoch);
 
+               srand(epoch);
                lttng_uuid_is_init = true;
        }
 
This page took 0.025413 seconds and 4 git commands to generate.