From 8541f70bd213cb2cb07bf5c420949d4439bde38f Mon Sep 17 00:00:00 2001 From: "Sanford Rockowitz (/shared/home/rock/dot_gitconfig)" Date: Wed, 20 Mar 2024 07:46:08 -0400 Subject: [PATCH] rpt_attr_edid(): check flag rpt2_silent before emitting hex dump of edid addresses issue #392 also use macro ASSERT_IFF() for clarity --- src/util/sysfs_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/sysfs_util.c b/src/util/sysfs_util.c index 2e94169ea..d65a87b04 100644 --- a/src/util/sysfs_util.c +++ b/src/util/sysfs_util.c @@ -483,9 +483,9 @@ rpt_attr_edid( *value_loc = NULL; GByteArray * edid = NULL; found = rpt_attr_binary(depth, &edid, pb1, NULL); - assert( (found && edid) || (!found && edid==NULL) ); + ASSERT_IFF(found, edid); if (edid) { - if (depth >= 0) + if (!rpt2_silent && depth >= 0) rpt_hex_dump(edid->data, edid->len, depth+4); if (value_loc) *value_loc = edid;