summaryrefslogtreecommitdiffstats
path: root/test/test_plugin.lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-10 13:48:57 -0500
committerDavid Robillard <d@drobilla.net>2022-12-10 19:04:45 -0500
commit708911daa222ac5f1423a02ebc89eeaf21548f5a (patch)
tree697278b2b700d3856b52a6150c1a7da82a91d4f2 /test/test_plugin.lv2
parent1988db57ca8003a406e08855ab66d1891fc5ce6b (diff)
downloadlilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.tar.gz
lilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.tar.bz2
lilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.zip
Avoid "suspicious" string comparisons
Diffstat (limited to 'test/test_plugin.lv2')
-rw-r--r--test/test_plugin.lv2/test_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_plugin.lv2/test_plugin.c b/test/test_plugin.lv2/test_plugin.c
index a0deccc..582fd9b 100644
--- a/test/test_plugin.lv2/test_plugin.c
+++ b/test/test_plugin.lv2/test_plugin.c
@@ -305,7 +305,7 @@ save(LV2_Handle instance,
char* apath = map_path->abstract_path(map_path->handle, tmp_file_path);
char* apath2 = map_path->abstract_path(map_path->handle, tmp_file_path);
free(tmp_file_path);
- if (strcmp(apath, apath2)) {
+ if (!!strcmp(apath, apath2)) {
fprintf(stderr, "error: Path %s != %s\n", apath, apath2);
}
@@ -407,7 +407,7 @@ restore(LV2_Handle instance,
char str[8];
size_t n_read = fread(str, 1, sizeof(str), f);
fclose(f);
- if (strncmp(str, "Hello\n", n_read)) {
+ if (!!strncmp(str, "Hello\n", n_read)) {
fprintf(
stderr, "error: Restored bad file contents `%s' != `Hello'\n", str);
}