diff options
author | Eric Wong <e@80x24.org> | 2023-09-24 20:19:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-24 23:14:21 +0000 |
commit | b8db6914a2a7da45cf0aed20240c8c6696a16968 (patch) | |
tree | 86ad51c6e6da846b14b29f97f1d9d130d68ae402 /t/cmd_ipc.t | |
parent | 1afb6f5133444bc53db047574d5142f85dfc2218 (diff) | |
download | public-inbox-b8db6914a2a7da45cf0aed20240c8c6696a16968.tar.gz |
Instead of converting to bytes to bits and asking `vec' to operate on single bits, we can just have `vec' work on 8 bits at-a-time. This also fixes an overallocation in pure Perl Linux recv_cmd4. Adding an extra byte ourselves for "\0" isn't necessary: Perl already does it internally everywhere when creating/resizing scalars.
Diffstat (limited to 't/cmd_ipc.t')
-rw-r--r-- | t/cmd_ipc.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/cmd_ipc.t b/t/cmd_ipc.t index 7313d13b..e5d22aab 100644 --- a/t/cmd_ipc.t +++ b/t/cmd_ipc.t @@ -97,7 +97,7 @@ my $do_test = sub { SKIP: { my $nr = 2 * 1024 * 1024; while (1) { - vec(my $vec = '', $nr * 8 - 1, 1) = 1; + vec(my $vec = '', $nr - 1, 8) = 1; my $n = $send->($s1, [], $vec, $flag); if (defined($n)) { $n == length($vec) or |