Skip to content
Commit a5198298 authored by Felix Lechner's avatar Felix Lechner
Browse files

In Lintian::Relation, return 0 for boolean FALSE only in public methods returning truth values.

Using undef to indicate boolean FALSE can have unintended
consequences.  For details, please see Bug#943724.

Some of the routines in this file return one of the three states 1, 0
and undef. This is presumably done to make the code more efficient.
The most notable example here is implies_element, but also
implies_array and the inverse subroutines for both. To return 0
instead of undef would be an error.

Instead, only the public-facing interface, which obviously means to
deliver boolean values, is modified.

In the case of Relation::visit, force scalar context. Otherwise the
regular expression in the 'matches' routine above it could return
undef.  All other users also expect boolean values, judging from the
POD for visit.

Gbp-Dch: ignore
parent d3d56f18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment