Skip to content

Commit

Permalink
rpt_attr_edid(): check flag rpt2_silent before emitting hex dump of edid
Browse files Browse the repository at this point in the history
addresses issue #392

also use macro ASSERT_IFF() for clarity
  • Loading branch information
rockowitz committed Mar 20, 2024
1 parent 7ff2e9c commit 8541f70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/sysfs_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8541f70

Please sign in to comment.