summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 621541f3..3e1ac3c2 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -326,17 +326,9 @@ open_dev_urandom(void)
* Fall back to /dev/random on old platforms
* where /dev/urandom does not exist.
*
- * In general, we can assume that any system
- * that would have urandom, probably has the
- * other device (/dev/urandom).
- *
- * Given that on many modern systems, urandom
- * and random are essentially the same, this
- * also provides some fault-tolerance there,
- * while still ultimately being strict under
- * fallback conditions, thus:
+ * We must reset the error condition first,
+ * to prevent stale error status later.
*/
-
errno = 0;
rname = oldrandom;