citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit dee240fdbbc07cd74cd3dee762ae59cb32124ed2
parent 2b15be0d5f2544a4105e7e0ef62d40a85c02ae7d
Author: Kyle Milz <kyle@0x30.net>
Date:   Fri, 29 Jul 2016 22:20:40 -0600

Test: collapse some lines

Diffstat:
MTest/Viewer.pm | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Test/Viewer.pm b/Test/Viewer.pm @@ -38,12 +38,10 @@ sub accept { ($self->{ver}, $self->{num_tus}, $self->{lines_total}, $self->{pid}, $self->{ppid}, $self->{pgrp}) = unpack("CL5", $buf); - my $buf = read_all($client, 2); - my $progname_sz = unpack("S", $buf); + my $progname_sz = unpack("S", read_all($client, 2)); my $progname = read_all($client, $progname_sz); - my $buf = read_all($client, 2); - my $cwd_sz = unpack("S", $buf); + my $cwd_sz = unpack("S", read_all($client, 2)); my $cwd = read_all($client, $cwd_sz); # Always sanity check these. @@ -58,8 +56,7 @@ sub accept { my @tus; for (1..$self->{num_tus}) { # Absolute file path. - $buf = read_all($client, 2); - my $file_name_sz = unpack("S", $buf); + my $file_name_sz = unpack("S", read_all($client, 2)); my $file_name = read_all($client, $file_name_sz); # Total number of lines and number of instrumented sites.