[Spice-devel] [server PATCH 4/4] stat_file_add_node: add "locked" comment
Uri Lublin
uril at redhat.com
Sun Dec 10 11:05:19 UTC 2017
Coverity complains node->flags is accessed without locking stat_file->lock.
However the function stat_file_add_node is only called (from
stat_file_add_counter) when the lock is taken.
Add comment so it's clear.
Signed-off-by: Uri Lublin <uril at redhat.com>
---
server/stat-file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/stat-file.c b/server/stat-file.c
index 2797fd739..9aff8cd72 100644
--- a/server/stat-file.c
+++ b/server/stat-file.c
@@ -139,6 +139,7 @@ static void reds_insert_stat_node(RedStatFile *stat_file, StatNodeRef parent, St
}
}
+/* Called with stat_file->lock locked */
StatNodeRef
stat_file_add_node(RedStatFile *stat_file, StatNodeRef parent, const char *name, int visible)
{
--
2.14.3
More information about the Spice-devel
mailing list