summaryrefslogtreecommitdiff
path: root/tests/shunloadtest.c
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2022-02-14 16:39:00 +0100
committerPeter Krempa <pkrempa@redhat.com>2022-02-15 09:32:23 +0100
commit654486bd57e056f0db1f4f1187337fbef65dd02d (patch)
tree9a9d19a408ecb5b298721ec6fe828925aabec5fb /tests/shunloadtest.c
parent7c35c483eaa78eb847e0865cbb210d5355f75d7a (diff)
downloadlibvirt-654486bd57e056f0db1f4f1187337fbef65dd02d.tar.gz
syntax-check: sc_avoid_write: Don't use blanket file exceptions
Adding an exception for the whole file usually defeats the purpose of a syntax check and is also likely to get forgotten once the file is removed. In case of the suggestion of using 'safewrite' instead of write even the comment for safewrite states that the function needs to be used only in certain cases. Remove the blanket exceptions for files and use an exclude string instead. The only instance where we keep the full file exception is for src/libvirt-stream.c as there are multiple uses in example code in comments where I couldn't find a nicer targetted wapproach. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'tests/shunloadtest.c')
-rw-r--r--tests/shunloadtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/shunloadtest.c b/tests/shunloadtest.c
index d4ab3cd5ac..724532a3ea 100644
--- a/tests/shunloadtest.c
+++ b/tests/shunloadtest.c
@@ -81,7 +81,7 @@ static void *threadMain(void *arg)
static void sigHandler(int sig)
{
- ignore_value(write(STDERR_FILENO, "FAIL\n", 5));
+ ignore_value(write(STDERR_FILENO, "FAIL\n", 5)); /* sc_avoid_write */
signal(sig, SIG_DFL);
raise(sig);
}