Annotate LGTM TOCTOU condition.

The race here is not avoidable.
This commit is contained in:
Milan Broz
2022-06-05 20:38:22 +02:00
parent 4913de11fc
commit e921991ba5
4 changed files with 5 additions and 5 deletions

View File

@@ -281,7 +281,7 @@ int tools_wipe_all_signatures(const char *path)
/* better than opening regular file with O_EXCL (undefined) */
/* coverity[toctou] */
fd = open(path, flags);
fd = open(path, flags); /* lgtm[cpp/toctou-race-condition] */
if (fd < 0) {
if (errno == EBUSY)
log_err(_("Device %s is in use. Cannot proceed with format operation."), path);