chiark / gitweb /
namespace: rework namespace support
[elogind.git] / src / shared / util.c
index 946b7d53f95c1144b44705a4082a4e458ed24443..e615195af580711d4c919ad4461325612c6e9f80 100644 (file)
@@ -3011,7 +3011,8 @@ unsigned long long random_ull(void) {
         uint64_t ull;
         ssize_t r;
 
-        if ((fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY)) < 0)
+        fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
+        if (fd < 0)
                 goto fallback;
 
         r = loop_read(fd, &ull, sizeof(ull), true);