Skip to content

Commit

Permalink
Perl: correct bug introduced by 67481b
Browse files Browse the repository at this point in the history
The expect_xml function always checked for 'ok', no matter what
the argument was. But this was harmless since the argument always
was 'ok'.
  • Loading branch information
matthiasl committed Dec 16, 2013
1 parent a40b63c commit 6e69d8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions perl/gth_control/lib/gth_control.pm
Expand Up @@ -177,7 +177,7 @@ sub set {

my $parsed = $self->next_non_event();

defined $parsed->{"ok"} || die("set failed");
expect_xml($parsed, "ok", "set failed");
}

sub unmap {
Expand All @@ -195,7 +195,7 @@ sub unmap {
sub expect_xml {
my ($parsed, $expected, $hint) = @_;

if (defined $parsed->{"ok"}) {
if (defined $parsed->{$expected}) {
return;
}
printf(STDERR "$hint\n");
Expand Down

0 comments on commit 6e69d8c

Please sign in to comment.