diff options
author | Bjørn Mork <bjorn@mork.no> | 2015-10-12 18:53:54 +0200 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2015-10-12 18:53:54 +0200 |
commit | 9074e037f97d117e607e9895898918eb23459312 (patch) | |
tree | a95f4184b50403c3cad05259fb9431fec59652e8 | |
parent | e3689ea634b173059b4c3da67faa62db242abdef (diff) |
swi_setusbcomp: remove buggy sorting
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rwxr-xr-x | scripts/swi_setusbcomp.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/swi_setusbcomp.pl b/scripts/swi_setusbcomp.pl index f819221..39ca06d 100755 --- a/scripts/swi_setusbcomp.pl +++ b/scripts/swi_setusbcomp.pl @@ -462,11 +462,11 @@ print "Got QMI DMS client ID '$dmscid'\n" if $verbose; # always get first. We need the list of supported settings to allow set &do_qmi(0x555b, &mk_qmi(2, $dmscid, 0x555b, {})) || &quit; my $current = $lastqmi->{'tlvs'}{0x10}[0]; -my @supported = sort(@{$lastqmi->{'tlvs'}{0x11}}); -my $count = hex(shift(@supported)); +my @supported = @{$lastqmi->{'tlvs'}{0x11}}; +my $count = shift(@supported); # basic sanity: -if ($count != $#supported) { +if ($count != $#supported + 1) { print "ERROR: array length mismatch, $count != $#supported\n"; print to_json(\@supported),"\n"; &quit; |