cid#318946 Argument cannot be negative

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I83716319a797ffb5e49c4b98676bfe864a75dec5
This commit is contained in:
Caolán McNamara 2023-07-04 09:47:25 +01:00 committed by Miklos Vajna
parent d078354eb7
commit b44a2b71b9

View file

@ -145,7 +145,8 @@ namespace Util
{
LOG_ERR("failed to read " << length << " hard random bytes, got " << len << " for hash: " << errno);
}
close(fd);
if (fd >= 0)
close(fd);
}
hex.rdbuf()->setLineLength(0); // Don't insert line breaks.